As the total mileage of the pipeline and the years of operation are increasing, the threat of landslide and corrosion defects to the safety of pipeline operation is also increasing. In this paper, based on the nonlinear elastoplastic theory, a pipe-soil coupling model is established to determine the maximum stress location of the pipeline containing corrosion defects under the action of landslide, on the basis of this location, the internal pressure of pipeline operation and the factors such as landslide width and landslide displacement are analyzed. Through multivariate linear regression, the equation of the maximum stress of the pipeline with the change of landslide width and displacement is fitted. The results show that in the landslide area, the operating pressure has less influence on the safety of the pipeline and the existence of corrosion defects will lead to sudden stress changes here, which will lead to the perforation of the pipeline; with the increase of the landslide width and landslide displacement, the plastic deformation area will appear in the middle of the pipeline, which means that the pipeline in this area is prone to bending, rupture and flattening and other failures, and the safety of the pipeline has a greater risk. In the non-slippery area, the maximum stress of the pipeline will increase with the increase of operating pressure, landslide width, and landslide displacement. Through multiple linear regression, the correlation coefficients of fitting the maximum stress of the pipeline with the expressions of landslide width and displacement are 0.959 and 0.996 respectively to prove the reliability of the formula.