Some 1,500 people were evacuated from surrounding towns following yesterday's incident near the rural municipalities of Matias Romero and Barrio Soledad. The Oaxaca prosecutor's office disclosed the death toll on its Twitter account.
State-run energy firm Pemex said in a statement that the leak was now under control.
The pipeline broke when it was hit by a backhoe used by construction workers expanding a road. The police and army have blocked the road.
It is the latest accident to hit Pemex, a state monopoly that has suffered deadly blasts at several facilities and pipelines in recent years, including a gas leak explosion that killed 37 people at its Mexico City headquarters earlier this year.