The deadly illness, which has also sickened 23 others in Kanigoro village in Central Java's Magelang district since July 22, has puzzled authorities and caused panicky villagers to flee the area.
Almost all of the victims had eaten a cheap local dish made from fermented soybean residue that was sold by a street vendor on July 21, said I Nyoman Kandun, the health ministry's director-general for contagious disease control.
"There are indications that the victims died from a toxin, and it is strongly believed that the toxin was bongkrekic acid, produced by the bacterium Pseudomonas cocovenenans," he said.
Fourteen of those who became ill are still in hospitals, he added.
The delicacy, tempe gembus, is made from soybean fibres left over from tofu production that are fermented in banana leaves.
The bacteria usually lives in fermented coconut, and it was not immediately clear why the food was infected, Kandun said.
"It is still inconclusive, but it is now very likely that the deaths were linked to the consumption of tempe gembus," he said.
Kandun said that authorities were still also studying whether the deadly toxin could have come from heavy metal or chemicals polluting water in the area.