The present invention relates to a composition for dyeing human keratin fibers such as the hair, comprising: (a) one or more amphoteric surfactants at a concentration of at least 0.5% by weight relative to the total weight of the composition (b) one or more organic alkaline agents (c) one or more oxidizing agents (d) one or more oxidation dye precursors (e) an amount of ammonia of less than 1.5% by weight relative to the total weight of the composition (f) one or more cationic polymers. The invention also relates to a process for treating human keratin fibers using this composition, and aerosol or nonaerosol devices that make it possible to apply this composition in foam form.