Updated: Sep 26, 2022
The short answer is YES, but for different reasons than you may think. In my own research, I have found other plumbers saying the water heater can explode. Although that could happen I guess, I personally don't believe a leaking water heater is going to explode. If the leak is coming out of the pressure relief valve then you do have a chance of an explosion if the valve corroded shut AND another malfunction happens within the tank to cause it to heat excessively. More than likely in that event you will have a water supply line to a toilet separate and flood your home first. I often see plumbers refer to the MythBusters water heater experiment. What they seem to overlook is that in order for MythBusters to achieve their results, they needed to cap the hot and cold water connections with threaded plugs. Installed in a home, the pressure is going to detach a smaller water line far before any explosion happens. This is why so many ice maker lines flood homes, it's a pressure problem, not a faulty connection. Water heaters in general are very safe but what I have personally seen over my career and it is discussed very little in our industry are two very distinct issues, one with gas water tanks and the other with electric tanks. That is extremely likely to happen when a water heater is leaking.
Gas tanks are probably the most dangerous when they leak. If left leaking long enough internally. It is possible the water corrodes the burner at the bottom of the tank. The burner is a stamped steel design in most cases and starts to rust as soon as water starts hitting it. When left long enough, the corrosion changes the size of the holes in the burner causing the air to fuel mixture to change. This change can cause carbon monoxide to be produced. A normally functioning gas water heater does not produce a dangerous amount of carbon monoxide. That is why the vent can have the air gap between the top of the tank and exhaust pipe. However when the gas is not burning correctly. The water heater has no sensor or the ability to stop this from happening and to make it worse a leaking tank is going to need to run more often, making the problem worse.
I have personally seen this situation happen quite a few times over the years. Once was when carbon monoxide detectors were fairly new and on a whim the homeowner picked up one at Lowes. She returned the first one because it went off as soon as she put the batteries in and when the second one did the same she called the fire department. They made her evacuate her condo for the night along with the neighbors on both sides. All over a leaking natural gas water heater. This family went through a lot and didn't realize what was happening. They racked up a bunch of vet bills and ended up putting down the family dog before they found out. The dog stayed in the basement at night. They also had a couple staying in the basement, trying to make a new life in the city but after constantly feeling ill, missing work and getting fired. Their friends were forced to move back home, setting aside their hopes of making a better life for themselves.
I once had a mother break down in tears in anguish when I told her I suspected her home most likely had a carbon monoxide problem. The water heater was tucked away behind the furnace and had been leaking for a long time. She realized at that moment, carbon monoxide was the likely source of all the problems her son was having in school and why he was constantly not feeling well. Unbenounced to me, they were at the end of their rope. Their son was an excellent student looking to get a college scholarship but this year. He kept missing school because he didn't feel well in the morning and his grades were so bad he was most likely going to fail his junior year of high school. His bedroom was in the basement and the water heater was on the backside of the wall near his bed.
Carbon monoxide detectors are so inexpensive now that EVERY home should have one. Even if you do not have gas appliances. Simply the chance that carbon monoxide could make it into your home is not acceptable. It could be a neighbor's power washer directing its exhaust into your home, it can be for any number of reasons. Please, even if your tank is not leaking. Have at least one detector where your gas appliances are and another on every level of the home where anyone could be sleeping.
Electric water heaters pose a different but equal risk. A leaking electric tank has a high risk of catching fire. This is especially the case when one or both of the front covers are removed. This commonly happens when someone is looking for a possible source of the leak. Then leaving the panels and insulation out because it is wet. Water and electricity do not go well together but those covers and insulation are there to deprive a fire of oxygen in the event the water hitting the 240 volt connections creates enough heat to ignite the foam insulation inside the tank. If someone removes the covers on your water heater, make sure they are promptly replaced no matter if it is leaking or not. If the tank is leaking, get it replaced soon. It is only a matter of time before the water and electricity create enough heat to melt down the inside of the water heater. Even if a fire does not happen, the smoke can be enough to ruin a lot of your household belongings.
As you can see both gas and electric tanks can be very dangerous when leaking. If you find yourself with a leaking water heater, don't be fooled into thinking you are safe because the water is safely going down the nearby floor drain. Get it replaced immediately, nothing good is going to come from waiting.