Abstract We use a two-dimensional particle-in-cell (PIC) simulation to study the propagation of subcritical fast magnetosonic shocks in electron-nitrogen plasma and their stability against an initial deformation. A slab of dense plasma launches two planar blast waves into a surrounding ambient plasma, which is permeated by a magnetic field that points out of the simulation box and is spatially uniform at the start of the simulation. One shock propagates into a spatially uniform ambient plasma. This reference shock has a Mach number of 1.75, and the heating of ions only along the shock normal compresses the ions that cross the shock to twice the upstream density. Drift instabilities lead to rapidly growing electron-cyclotron harmonic waves ahead of the location where the shock's density overshoot peaks, and to slowly growing lower-hybrid waves with a longer wavelength behind it. The second shock wave enters a perturbation layer that deforms it into a sine shape. Once the shock leaves the perturbation layer, the deformation is weakly damped and non-oscillatory, and the shock remains stable. Even without an external perturbation, and for the plasma parameters considered here, drift instabilities will cause ripples in the shock wave. These instabilities lead to a spatially and temporally varying compression of the plasma that crosses the shock.