To investigate the leakage characteristics of pure hydrogen and hydrogen-blended natural gas in medium- and low-pressure buried pipelines, this study establishes a three-dimensional leakage model based on Computational Fluid Dynamics (CFD). The leakage characteristics in terms of pressure, velocity, and concentration distribution are obtained, and the effects of operational parameters, ground hardening degree, and leakage parameters on hydrogen diffusion characteristics are analyzed. The results show that the first dangerous time (FDT) for hydrogen leakage is substantially shorter than for natural gas, emphasizing the need for timely leak detection and response. Increasing the hydrogen blending ratio accelerates the diffusion process and decreases the FDT, posing greater risks for pipeline safety. The influence of soil hardening on gas diffusion is also examined, revealing that harder soils can restrict gas dispersion, thereby increasing localized concentrations. Additionally, the relationship between gas leakage time and distance is determined, aiding in the optimal placement of gas sensors and prediction of leakage timing. To ensure the safe operation of hydrogen-blended natural gas pipelines, practical recommendations include optimizing pipeline operating conditions, improving leak detection systems, increasing pipeline burial depth, and selecting materials with higher resistance to hydrogen embrittlement. These measures can mitigate risks associated with hydrogen leakage and enhance the overall safety of the pipeline infrastructure.