Magnetosonic-whistler waves may be destabilized by runaway electrons both in fusion and astrophysical plasmas. A linear instability growth rate of these waves in the presence of a runaway avalanche is calculated both perturbatively and by numerical solution of the full dispersion equation. The local threshold of the instability depends on the fraction of runaways, the magnetic field, and the temperature of the background plasma. The quasilinear analysis shows that the main result of the instability is the scattering of the electrons in pitch-angle. It appears possible that this instability could explain why the number of runaway electrons generated in tokamak disruptions depends on the strength of the magnetic field.