Gas-buried steel pipes are exposed to various types of corrosion during their service life, and as a result, their initial resistance is significantly reduced. In most previous studies, the seismic vulnerability analysis of these pipes has been done without considering corrosion. The present study evaluates the seismic vulnerability of gas-buried steel pipes and extracts fragility curves considering pipe corrosion. Due to the impossibility of objectively observing the corrosion rate of pipes, a probabilistic model is presented considering the random effect in pipeline corrosion, and for different percentages of corrosion, the critical corrosion range is calculated. Then by modeling the corroded pipe in the soil and applying earthquake acceleration to it, incremental dynamic analysis (IDA) is performed in ABAQUS software and IDA curves are obtained. In the following, the probability of exceedance curves for strain are extracted, and the probability of vulnerability for different pipe corrosion conditions is determined. Finally, the seismic fragility curves of the pipeline showing the probability of failure (POF) as a function of peak ground acceleration (PGA) are obtained. The results show that corrosion percentage, variety of corrosion points, and PGA, strongly affect the uncertainty of strain data and subsequently the probability of failure of the pipeline system. For PGA = 0.4 g, in the case of a healthy pipe, the probability of exceeding the failure criterion strain is close to zero, while this probability is close to 80% for a pipe with average corrosion of 60%.