News reports said 11 of the fatalities were minors but the government did not immediately confirm this.
Residents were preparing for the May 15 celebrations when the fireworks, being stored in readiness for the festival, exploded about 9:30pm in a house adjacent to the village church.
"It is a tragedy".
The Mexican president, Enrique Pena Nieto, offered condolences to the families of those who lost their lives and wish a speedy recovery to the injured.
The fireworks explosion in San Isidro, a village 170 miles east of Mexico City, is the second incident in recent months. It was reduced to smoldering ruins.
A government statement Tuesday says the blast took place the previous night in the town of San Isidro, in the Chilchotla municipality. The areas where the recent fireworks explosions have happened in Mexico are some of the most popular fireworks makers in the country.
The San Pablito market had been rocked by two explosions in the past: In September 2005 ahead of the Independence Day holiday, and again the following year.
Puebla government official Diodoro Carrasco insisted the industry "is perfectly well regulated", in comments to television channel Milenio.
"It is very hard to revise and monitor houses across the whole state, and even more so in communities in the hills that have a tradition of fireworks and a busy schedule of religious festivals". "What is very hard to foresee is how (fireworks) are transported, whether they are stored properly", Carrasco said.
"Unfortunately we can not be in all places at all times. and like last night, accidents happen", he said.