Leishmaniasis parasites eat human flesh. Cordyceps fungi lead ants to suicide. Toxoplasma gondii eliminate a mouse’s fear of cats. And a barnacle called Sacculina carcini castrates crabs, roots itself into their bodies and brains and transforms them into walking zombie slaves that care for the parasite’s brood as if it were their own.

Parasites are bad — except when they’re not.

In forests across eastern North America, wood-eating beetles chew through fallen logs. This helps break down wood and return nutrients to the soil. But many beetles become infected by the thousands with a common, parasitic worm that makes their insides look like a plate of moving spaghetti.

There’s little evidence the parasites are harmful. Instead, infected beetles seem to be bigger and eat more than uninfected ones, suggests a study published Wednesday in Biology Letters. This increased consumption may help the forest cycle nutrients faster, and benefit the whole ecosystem.

[Like the Science Times page on Facebook. | Sign up for the Science Times newsletter.]

“Everything is connected,” said Andy Davis, an ecologist at the University of Georgia who led the research. “Here’s a case where there’s a little tiny bug in the forest and it’s actually doing a service within the forest. It’s doing something important. But then there’s another bug that lives inside that bug that’s doing something important.”