The blast struck Monday night in San Isidro, a remote farming village of some 40 houses in central Puebla state, the regional government said.
"A group of people lived in the house where the pyrotechnic material was stored for use in the festivities".
The blast happened in a house in Chilcotla, Puebla state, which was being used as a warehouse to store fireworks ahead of a local festival next week.
Local reports said that a further 22 people were injured in the explosion in the town of Puebla.
An explosion at the San Pablito fireworks market in Tultepec, outside Mexico City, left at least 26 dead and dozens more injured.
At least 14 people have died in an explosion at a fireworks factory in Mexico, officials said.
Nine people were killed on the spot and five more died after being taken to nearby hospitals - earlier, 30 people were reported injured.
State governor Antonio Gali Fayad said he had ordered the authorities "to see to the wounded and give the village of San Isidro all the help necessary".
The blast was set off by a rocket that was sacked from outside the building and struck the stored pyrotechnic material, the government said. The market was well stocked with fireworks at the time and there were hundreds of customers. The explosion at the market in December was not the first in the area.
In Mexico, where festivals and holidays are frequently celebrated with fireworks, accidental blasts with deadly consequences have become a common occurrence.
The fireworks industry reports almost Dollars 10 million a month in revenue in Mexico.