The invention relates to a composition for dyeing human keratin fibres such as the hair, in foam form, comprising at least one alkaline agent, at least one oxidizing agent, at least one oxidation dye precursor, at least one liquid fatty alcohol and at least one cationic polymer with a cationic charge density of greater than 1 meq./g. The invention also relates to a process for dyeing human keratin fibres using this composition. A subject of the invention is also a device for dyeing keratin fibres, comprising the composition of the invention in liquid form and a foam dispenser for delivering the composition in the form of a foam.