Through the confinement of gas in nanoporous materials, it is possible to significantly increase the path length for light–gas interaction. This enables the observation of much stronger absorption features for the confined gas molecules. In this work, we systematically characterized a variety of disordered strongly scattering ZrOand Al O nanoporous ceramic materials to exploit the potential of gas in scattering media absorption spectroscopy. As a result, we identified a material with an unprecedented performance in terms of optical path length enhancement. In ZrO with thicknesses above 6 mm, the path enhancement exceeds 1000. The results obtained with near-infrared absorption spectroscopy on oxygen were validated by time-of-flight measurements at 700 nm, thus demonstrating their robustness. Finally, we report quantitative oxygen concentration measurement using nanoporous materials as miniaturized random-scattering multipass cell with an extremely simple and low-cost setup.