The incident took place at 12.10pm, causing damage to the whole factory, vehicles and residences within a radius of 500 metres. The injured people were sent to nearby hospitals for treatment.
Satit Khamnorkaew, the mayor of San Pu Loei subdistrict municipality, said firefighters have prevented people from entering the scene as potassium inside the factory could trigger repeated explosions.
He said a centre has been opened to assist people affected by the explosion, adding that the factory had also seen an explosion six to seven years ago.
Meanwhile, Pol Colonel Thongchai Kannika, superintendent at Doi Saket Police Station, said a person identified as "Pongsiri" told the police that the explosion was triggered by a spark from the electric cutout falling on the fireworks storage area.