What causes the frothy substance on the stems of rosemary and basil? The froth is created by an insect called a spittlebug which is well hidden in the mass of frothy bubbles that it produces. The bubbles act as protection from predators, moisture loss and temperature fluctuations. Without the mass of spittle surrounding it, these insects would quickly dehydrate and die.
The spittlebug inserts its mouthpart like a hypodermic needle into the stem of the plant and sucks out the juices. In many cases, spittlebugs do not cause serious damage, yet the plants are unsightly. Ants, birds and spiders have been known to feed on these insects, but generally, they are not efficient enough to completely eliminate the infestation. The spittlebug and its froth can be removed from plants with a forceful stream of water from a garden hose.