A cosmetic composition which contains water, (a) at least one ammonium salt which is soluble or gives a microemulsion in aqueous surfactant systems and which has a molecular weight distribution of 10.sup.4 to 10.sup.9, the molecular weight of at least 5 percent by weight of the copolymeric salt being 10.sup.7 to 10.sup.9 and the salt containing on average 5 to 100 mole % of recurring structural elements of the formula ##STR28## and O to an average 95 mole % of recurring structural elements of the formula ##STR29## and O to an average 10 mole % of recurring structural elements of the formulas ##STR30## in which A.sub.1, A.sub.2, A.sub.3 and A.sub.4 are each hydrogen or methyl, G.sub.1 and G.sub.2 differ from one another and are each --CN, --COOH or ##STR31## D.sub.1 and D.sub.2 are each oxygen or --NH--, E.sub.1 and E.sub.2 are each alkylene having 1 to 4 carbon atoms which is unsubstituted or substituted by hydroxyl, R.sub.1, R.sub.2, R.sub.3 and R.sub.4 are each methyl or ethyl, Q is alkyl, hydroxyalkyl having 1 to 4 carbon atoms or benzyl, and Y.sup.- is a halide, alkylsulfate or alkylphosphonate anion having 1 to 4 carbon atoms in the alkyl radical, and (b) at least one non-ionic surfactant or a surfactant with one positive and one negative charge within the molecule, wherein the composition contains components (a) and (b) in a weight ratio of 1:2 to 400.