Mother-in-law bought a watermelon by the roadside and it frothed with white foam when cut open. Was it injected with chemicals?

Mother-in-law bought a watermelon by the roadside, and with one cut of the knife it bubbled with "white foam." Netizens ask: was the watermelon injected with chemicals?
Watermelon is a great companion for cooling off and beating the summer heat, bought every few days to eat. We often see melon farmers pulling a cart full of watermelons through the streets and alleys of villages and cities; no matter how hot it is, they sell from morning to night every day. Normally when we eat watermelon we make a point of buying from the melon farmers, and seeing how hard they work, we hope they sell out early and go home. But just a few days ago, my mother-in-law bought a few watermelons from a roadside melon farmer, and after one night this is what happened. It really left us completely baffled. Let's take a look!
The watermelon had just been bought, and after one night, when we were about to eat it, we found two small holes on the watermelon continuously bubbling. At first we thought it was just a bit of white foam on the surface, but later when we took it to the sink to wash it, we discovered the white foam was actually coming from inside the watermelon. This really shocked the family, so we posted it online to ask netizens. Someone commented, "This couldn't be a watermelon injected with chemicals, could it?" I wonder if you've ever encountered this situation?
Later, after looking up relevant information online, we found that this kind of watermelon was not, as my family and netizens worried, a watermelon injected with chemicals. Rather, because summer is too hot, the watermelons the melon farmer placed on the cart, due to transport or squeezing, developed detached flesh inside the watermelon, which after fermentation swelled and spoiled, leading to the watermelon bursting or foaming with white foam. Now we can finally relax, but this kind of watermelon still cannot be eaten.
Besides this naturally occurring spoilage problem with watermelons, in daily life we also worry that a watermelon that is too sweet has been injected with sodium cyclamate, or that if it is too full of water we bought a water-injected watermelon. Actually, these things almost never exist. Once you poke a needle into a watermelon, it rots at the hole, so nobody would do that. Injecting the vine takes time and effort, and once the melon vine is damaged, the melon becomes deformed and simply cannot be sold. If the watermelons can't be sold, the loss is even greater.