The paper describes a numerical investigation of linear and nonlinear instability in high-speed boundary layers. Both a frozen gas and a finite-rate chemically reacting gas are considered. The weakly nonlinear instability in the presence of a large-amplitude two-dimensional wave is investigated for the case of fundamental resonance. Depending on the amplitude of this two-dimensional primary wave, strong growth of oblique secondary perturbations occurs for favourable relative phase differences between the two. For essentially the same primary amplitude, secondary amplification is almost identical for a reacting and a frozen gas. Therefore, chemical reactions do not directly affect the growth of secondary perturbations, but only indirectly through the change of linear instability and hence amplitude of the primary wave. When the secondary disturbances reach a sufficiently large amplitude, strongly nonlinear effects stabilize both primary and secondary perturbations.