Armed forces spokesman Iskandar Sitompul said the blast near the capital Jakarta was believed to have followed an electrical short-circuit in the building.
The explosion shattered the warehouse belonging to an elite naval combat force, spraying victims with shrapnel and pieces of wood and glass.
"Most of them were injured by pieces of wood and glass that pierced them on their cheek, chest and stomach," Sitompul said.
Television footage showed a column of black smoke towering over the area shortly after the morning accident.