Plastic waste — all those bags, fast-food clamshells, water bottles and the like — is a massive global problem. The bacteria E. coli also has a bad reputation, as it can cause a nasty case of food poisoning. But put the two together, and you get something surprising, and pretty sweet: vanilla flavoring widely used in products as diverse as ice cream and soap.

That’s according to new research by University of Edinburgh scientists published in the journal Green Chemistry. The researchers hailed their findings as a breakthrough in the fight against plastic waste with potentially wide application.

The scientists set out to solve a problem presented by the some 50 million tons of plastic waste generated annually: even when that waste is recycled, it is often made into “second-generation” products that eventually wind up as plastic waste once again.

To break the cycle, the team used lab-engineered E. coli to turn the plastic-derived molecule terephthalic acid, “via a series of chemical reactions,” into something valuable: vanillin, a compound used to scent and flavor foods and cosmetics that’s also found in herbicides and cleaning products. Manufacturers used 37,000 tons of the stuff in 2018, the scientists noted. Vanillin typically comes from vanilla beans or is synthesized from the petrochemical precursor guaiacol.

And to show the real-world applications of their findings, the scientists converted a used bottle into vanillin by adding the E. coli to the degraded plastic.

Turning plastic into such a useful commodity is new, the researchers said. “This is the first example of using a biological system to upcycle plastic waste into a valuable industrial chemical and this has very exciting implications for the circular economy,” Joanna Sadler, fellow with the University of Edinburgh’s School of Biological Sciences, said in a statement.

Scott Faber, the head of governmental affairs for the Environmental Working Group, urged caution — and a dose of regulatory skepticism, suggesting that the Food and Drug Administration needed to vet the product. “What can go wrong? These kinds of Rube Goldberg chemistry experiments should be scrutinized by food safety experts at FDA,” he said. “Too often, it’s the chemical companies, not the FDA, who decide what’s safe to eat.”

Scientists have previously found ways to break down plastic waste using enzymes. A “super enzyme” revealed last year can eat up plastic six times faster than previous formulations. The University of Edinburgh research indicates that waste can also be put to use in new ways.

“Our work challenges the perception of plastic being a problematic waste and instead demonstrates its use as a new carbon resource from which high value products can be obtained,” Stephen Wallace, one of the researchers, said in a statement.

The researchers have yet to verify that the vanillin is safe for human consumption, but they say they believe it is and plan further tests, according to the news website IFLScience.

More from Voraciously: