High-energy cosmic rays are observed indirectly by detecting the extensive air showers initiated in Earth's atmosphere. Air showers are hadronic cascades, which eventually decay into muons and the muon number is a key observable to infer the mass composition of cosmic rays. The interpretation of these observations relies on accurate models of air shower physics, which is a challenge and an opportunity to test QCD under extreme conditions. Air shower simulations with state-of-the-art QCD models show a significant muon deficit with respect to measurements; this is called the Muon Puzzle. The origin of this discrepancy has been traced to the composition of secondary particles in hadronic interactions. The muon discrepancy starts at the TeV scale in the centre-of-mass frame, which suggests that the origin should be observable at the Large Hadron Collider. An effect that can potentially explain the puzzle has been observed at the LHC, but needs to be confirmed with forward facing experiments, and with future data on oxygen beams.