The present invention relates to a cosmetic composition in a container comprising at least one inner bag and an outer container, wherein the outer container encloses the inner bag and is filled with a propellant compressing the inner bag, and a valve mechanism attached to the inner bag moveable between an open position, in which a composition stored in the inner bag is allowed to be discharged by the pressure of the compressed gas in foam form, and a closed position, in which the composition is not allowed to be discharged, wherein the composition within the inner bag comprises 0.1 to 5% by weight of a cationic surfactant (A), 0.1 to 10% by weight of a fatty alcohol (B), and 0.1 to 10% by weight of carbon dioxide.