At least 5 children are said to be among the dead.
More than 20 people were also reported injured.
The blast happened on Monday night in San Isidro Huilotepec as villagers were preparing for a Saint’s Day celebration next week.
The authorities say a lit rocket was thrown into a building where the pyrotechnics were kept.
The entire structure, which local media says was an inhabited house, was destroyed by the blast.
In December, more than 30 people were killed in a huge fireworks explosion in a Tultepec, just outside Mexico City.
Many Mexicans see Tultepec as “the country’s capital of pyrotechnics”, and survivors spoke of “hellish scenes” as fireworks took off in all directions, causing panic and destruction.