Foam oozing from a tree trunk usually comes from bacteria fermenting sap inside the wood, a condition arborists call slime flux or bacterial wetwood. Less often, the culprit is an insect, a fungal fermentation on the bark surface, or simply rainwater reacting with natural compounds in the bark itself. The sight can be alarming, but most causes of tree foam are not life-threatening to the tree, and the range of explanations is narrower than you might expect.
Slime Flux, the Most Common Cause
If you see a frothy, wet streak running down the trunk, often with a sour or beer-like smell, you are almost certainly looking at slime flux. The process starts when bacteria enter the wood through a wound, whether from a pruning cut, a broken branch, storm damage, or even an insect boring hole. Once inside the moist heartwood, those bacteria multiply and begin fermenting sugars in the sap. The fermentation produces carbon dioxide, and the gas builds pressure inside the trunk until sap is forced out through cracks, old wounds, or weak spots in the bark.1FEMS Yeast Research. Botryozyma mucatilis sp. nov., an anamorphic ascomycetous yeast associated with nematodes in poplar slime flux
Once this pressurized sap reaches the outside air, yeasts and other microorganisms colonize it rapidly, making the fluid thicker and slimier. That slimy layer is what gives the condition its common name. The ooze can range from a pale, watery trickle to a dark, bubbly froth. Research on silver birch trees identified a bacterium called Enterobacter nimipressuralis as the primary agent responsible for the active phase of the disease, which shows up as bark bloating, necrotic wet stains, and a generous flow of exudate.2Folia Forestalia Polonica. Bacterial wetwood of silver birch (Betula pendula roth): symptomology, etiology and pathogenesis Other bacterial species may be present but tend to play secondary roles.
Slime flux is widespread. It affects oaks, elms, maples, birches, poplars, willows, and many other hardwoods. The foam itself often kills grass or small plants directly underneath it because of its acidity and alcohol content, which can make the damage look worse than it is for the tree. The tree itself, though, is usually not in serious danger. The bacteria involved are considered weak pathogens at most. They exploit wood that is already wounded or stressed, and in many mature trees the fluxing comes and goes for years without causing structural decline.
Alcoholic Flux, a Surface Cousin
Slime flux originates deep inside the wood and is pushed outward by internal gas pressure. Alcoholic flux, by contrast, is a surface fermentation. It happens when sap that has leaked from a wound, or simply moisture on the bark, gets colonized by yeasts and fungi in the open air. The result looks similar, a frothy or slimy patch, but it tends to be lighter in color and concentrated around a specific wound rather than streaking down the trunk.
Classic studies of this phenomenon on elms and horse chestnuts found a consistent community of organisms in the brown flux: species of the fungus Oospora, a spore-forming yeast, and Fusarium, along with fluorescent bacteria, algae, and even insect larvae.3ScienceDirect. Observations on the “slime-fluxes” of trees The key difference from bacterial wetwood is that no internal gas pressure is driving the flow. Instead, the sap simply sits on the bark surface and ferments in place, which limits how far the foam can spread.
In warm, humid weather, alcoholic flux can smell strongly of fermentation, almost like a brewery. It often appears in summer and fades as temperatures drop. Like slime flux, it is rarely a threat to the tree’s overall health, though it can be unsightly and attract insects.
Spittlebug Foam on Branches and Twigs
Not all tree foam comes from the trunk. If you spot small blobs of white, bubbly foam on stems, leaves, or younger branches, the source is probably a spittlebug nymph. These insects, members of the family Aphrophoridae, feed on plant sap and excrete a frothy mass from their hind end to encase themselves while they develop. Each blob of foam typically conceals a single small green or brown nymph.
The foam is more than just a hiding spot. Research on the alder spittlebug found that the foam protects the nymph in multiple ways at once. The wet foam physically shields the insect from predators, parasites, temperature swings, and drying out. If a predator does get caught in the foam, it becomes increasingly sticky as it dries, trapping the attacker. The pull-off force needed to escape the foam increases the drier it gets, because the foam desiccates about as fast as water, turning from a loose froth into a surprisingly effective adhesive.4PubMed Central. Adhesive properties of Aphrophoridae spittlebug foam
Spittlebug foam appears in spring and early summer when the nymphs are actively feeding. It is essentially harmless to the plant. A few nymphs on a large tree remove a trivial amount of sap. On small ornamental plants or garden herbs you might notice slight wilting if populations are heavy, but on a tree, spittlebugs are a cosmetic nuisance at most. You can wipe or hose off the foam if it bothers you, though the nymphs will usually just produce more.
Rainwater and Natural Bark Saponins
Sometimes a tree foams after heavy rain with no infection, no insects, and no wounds involved. This can be confusing, but the explanation is straightforward: many trees naturally contain saponins, a class of chemical compounds that act as surfactants. When water runs down bark that is rich in saponins, it lowers the surface tension of the water enough to whip air into a froth, essentially the same thing soap does.
Saponins are widespread in the plant kingdom. Research on the tropical tree Jatropha curcas found that saponins from its stem bark were effective enough to reduce the surface tension of water by nearly half and produced stable foam with genuine cleaning ability.5PubMed Central. Characterization of saponins from the leaves and stem bark of Jatropha curcas L. for surface-active properties Saponin concentrations vary by species and even by individual tree, which is why one oak in your yard might foam in a downpour while the identical species next to it does not.
Horse chestnuts are especially well known for this. Their bark and fruit husks are loaded with saponins, which is why you can actually use horse chestnuts as a crude laundry detergent. But plenty of other species produce enough saponins to foam in the right conditions. The foam is typically white, odorless or mildly earthy, and pools around the base of the trunk where runoff collects. It disappears on its own once the rain stops and the water soaks into the ground. There is nothing wrong with the tree, and nothing you need to do.
Spring Sap Pressure and Freeze-Thaw Foaming
In late winter and early spring, you may notice sap weeping from pruning cuts, cracks, or old wounds, sometimes with a light foam. This is driven by a different process than bacterial wetwood. When nighttime temperatures drop below freezing and daytime temperatures climb above it, the cycle creates pressure changes inside the trunk that push sap outward. Experiments have shown that stem pressures rise significantly only when ambient temperatures oscillate around the freezing point, though the precise mechanism behind this exudation remains a topic of active scientific debate. The leading hypothesis points to a physical process combining freeze-thaw cycles with osmosis.6PubMed Central. Multiscale model of a freeze-thaw process for tree sap exudation
Maple syrup producers rely on exactly this phenomenon. The same pressure that drives sap into a bucket or tubing system can also push sap out of any wound or crack a tree has. If the sap sits on bark in warm daytime air, airborne yeasts colonize it quickly and a light foam can develop. This is perfectly normal seasonal behavior and stops on its own once nighttime temperatures stay consistently above freezing. If your tree only foams in March or early April and the foam is light-colored and mild-smelling, freeze-thaw sap flow is the likely explanation.
How to Tell What Is Causing the Foam
Pinpointing the cause usually comes down to four observations: where on the tree the foam appears, what it looks and smells like, when it shows up, and whether there is a visible wound nearby.
- Trunk streak with a sour smell: Slime flux. Look for a dark, wet trail running down the bark from a wound, crack, or branch crotch. The smell is distinctive, somewhere between vinegar and stale beer. If there is a pale or dark crust where the flow has dried, that is further confirmation.
- Localized patch around a wound: Alcoholic flux. The foam stays close to one spot instead of streaking downward. It often has a yeasty, fermented smell and appears in warm weather.
- Small white blobs on stems or leaves: Spittlebug nymphs. Gently part the foam with a stick and you will find the insect inside. The blobs are usually on newer growth rather than the main trunk.
- White foam at the trunk base after rain: Saponin runoff. No smell, no wound, and it goes away as the ground dries. Most common on species known for high saponin content.
- Light sap ooze in early spring: Freeze-thaw sap pressure. Comes and goes with temperature swings and stops once the weather warms consistently.
If the foam is accompanied by large areas of dead or sunken bark, extensive dieback in the canopy, or soft and crumbling wood, those are signs of a more serious fungal or bacterial infection rather than straightforward slime flux. In that case, consulting a certified arborist is worth the cost. For most foaming, though, you are looking at a condition that is unpleasant to the eye and nose but not dangerous to the tree.
What to Do About It
For slime flux and alcoholic flux, the honest answer is that there is no cure, and in most cases none is needed. Older advice sometimes recommended drilling a hole into the trunk and inserting a pipe to drain the internal pressure. Arborists have largely abandoned that approach because it creates yet another wound for bacteria to exploit and does not resolve the underlying fermentation. The better strategy is to minimize new wounds: prune only when necessary, make clean cuts, and avoid damaging the trunk with lawn equipment.
If the appearance of slime flux bothers you, you can wash the bark with plain water to remove the residue. Avoid using bleach or disinfectants on the tree’s bark, since these can damage living tissue without reaching the bacteria inside the wood. Keeping the tree generally healthy through proper watering, mulching, and avoiding soil compaction helps it compartmentalize the infection on its own. Healthy trees are better at walling off internal decay than stressed ones.
For spittlebugs, a strong spray of water from a garden hose dislodges them. Pesticides are overkill for a problem that causes no real damage to a tree. If you are dealing with saponin-based foaming after rain, there is literally nothing to fix. The foam is a byproduct of the tree’s own chemistry and will clear on its own.
Spring sap flow foaming likewise requires no action. If sap is weeping heavily from a large pruning cut made during the dormant season, you can minimize future occurrences by timing major pruning for late summer, after sap pressure has dropped. Wound sealants and tree paints, once commonly recommended, have fallen out of favor because research has generally shown they do not speed healing and can trap moisture against the wound.
The Ecosystem That Tree Foam Supports
One of the more interesting things about fermenting sap on a tree is how many other organisms it attracts. The strong smell of slime flux pulls in a surprisingly diverse community of insects. Field research examining insect communities at fermenting sap sites found that the abundance of the sap resource was positively correlated with the number of species present and the total number of insects visiting. Parasitoid wasps, fruit flies, and rove beetles showed especially strong responses to patches where fermenting sap was plentiful, and patches with more of the resource also attracted more hornets.7Ecological Research. Influence of resource abundance on the structure of the insect community attracted to fermented tree sap
If you have ever noticed butterflies, moths, or beetles clustered on a weeping patch of bark, they are feeding on the sugars and alcohols in the flux. Some butterfly species that rarely visit flowers depend heavily on fermenting sap as a food source, and entomologists sometimes use fermenting-sap bait traps to survey local insect diversity. The nematodes and insect larvae that live directly in the slime add another layer to this small ecosystem.1FEMS Yeast Research. Botryozyma mucatilis sp. nov., an anamorphic ascomycetous yeast associated with nematodes in poplar slime flux Even the yeasts themselves are ecologically specialized: at least one novel yeast species was first described from poplar slime flux, found nowhere else.
So while a foaming tree might look sick to you, from the perspective of dozens of insect and microbial species, it is a resource hotspot. If the tree is otherwise healthy and you can tolerate the mess, leaving the flux alone provides a small but meaningful habitat feature in your yard. Cleaning it up is fine too, but knowing that the ooze supports a web of life can make it a little easier to accept.