The invention relates to a composition for dyeing human keratin fibers such as the hair, in foam form, comprising at least one alkaline agent, at least one oxidizing agent, at least one oxidation dye precursor and at least one nonionic surfactant of formula (I) R—0—(CH2—CH2—0)n—H (I) in which R represents a linear or branched C10-C18 alkyl or alkenyl radical, n represents a number ranging from 10 to 15. The invention also relates to a process for dyeing human keratin fibers using this composition. A subject of the invention is also a device for dyeing keratin fibers, comprising the composition of the invention in liquid form and a foam dispenser for delivering the composition in the form of a foam.