We derive a general expression for the cumulant generating function describing the propagation of electron avalanches in inhomogeneous media. The results have applications in the theory of particle counting devices which rely on signal amplification by electron multiplication.