Garbage is a big problem. Even with so many of us doing our bit to help out with recycling, the amount of unrecyclable and discarded plastics in the US alone comes close to 30 million tonnes annually, thanks to things like disposable coffee cups (2.5 billion of which are thrown away by Americans every year). We're looking at you, Starbucks.

Now, for the first time, researchers have found detailed evidence that bacteria in an animal's gut can safely biodegrade plastic and potentially help reduce the environmental impact of plastic in landfill and elsewhere. The animal in question? The humble mealworm – which turns out to be not so humble after all.

Researchers led by Stanford University in US and Beihang University in China found that the mealworm – the larval form of the darkling beetle – can safely subsist on a diet of Styrofoam and other kinds of polystyrene, with bacteria in the worm's gut biodegrading the plastic as part of its digestive process. The findings are significant because it was previously thought that these substances were non-biodegradable – meaning they ended up in landfill (or worse, our oceans, where they'd accumulate for decades).

"Our findings have opened a new door to solve the global plastic pollution problem," co-author Wei-Min Wu, a senior research engineer in the Department of Civil and Environmental Engineering at Stanford, said in a statement.

In the study, 100 mealworms ate between 34 and 39 milligrams of Styrofoam each day, converting about half into carbon dioxide and the other excreting the bulk of the rest as biodegraded droppings. They remained healthy on the plastic diet, and their droppings appeared to be safe for use as soil for crops.

Compared to the amount of plastic people go through every year, the mealworms' capacity to process our waste product might not sound like much, but further research could help us engineer more powerful enzymes for plastic degradation, including processing other kinds of currently impervious plastics, including polypropylene, microbeads, and bioplastics.

The researchers are also looking to find whether a marine equivalent of the mealworm may exist, as hundreds of thousands of tonnes of plastic in the world's oceans are an ongoing environmental concern.

"There's a possibility of really important research coming out of bizarre places," said Craig Criddle, a professor of civil and environmental engineering who supervised the research. "Sometimes, science surprises us. This is a shock."

The studies are published here and here in Environmental Science & Technology.