Stray current corrosion has become one of the important reasons for corrosion failure of buried steel pipelines. In this paper, based on Comsol Multiphysics software, the influence of stray current on the corrosion of buried steel pipes under cathodic protection was simulated and analyzed, and the influence of leakage voltage, soil conductivity, pipeline buried depth and other factors on the cathodic protection potential was analyzed. The simulation results show that under the action of -1V cathodic protection, when the leakage voltage exceeds 10V, the interference degree of stray current is very strong, and the cathodic protection is likely to fail. Under cathodic protection, soil average current density was positively correlated with soil conductivity under a certain leakage voltage. With the increase of burial depth, the positive shift of pipeground potential decreases and gradually returns to the cathodic protection potential level. Therefore, the buried range greater than 1.5m is determined within the allowable range of field technology and economy, and the combination of cathodic protection can better prevent stray current corrosion interference. The research in this paper has important guiding significance for further understanding of stray current corrosion mechanism of buried steel pipelines.