Pornographic adverts and images have been found in children's apps that have been downloaded millions of times on the Google Play store.
More than 60 apps, which included children's characters such as Lightning McQueen from Disney's Cars, were infected with malware that sent malicious, adult-themed adverts to smartphones upon which the games were installed.
The virus, dubbed AdultSwine, made pop up adverts with adult pictures appear in the middle of children's video games and in some instances, prompted users to download fake anti-virus apps.
AdultSwine also hijacked user phone numbers to send premium text messages which charged money to the account associated with the phone number.
Security researchers Check Point, who discovered the bug, said AdultSwine was a "particularly insidious malware able to cause emotional distress and financial fraud".
Google has since removed the infected apps and blocked their publishers.
A Google spokesman said: "We’ve removed the apps from Play, disabled the developers’ accounts, and will continue to show strong warnings to anyone that has installed them. We appreciate Check Point’s work to help keep users safe."
At a glance | How to protect yourself from hackers
The ten most popular apps infected by AdultSwine, which all had more than 100,000 downloads, included Five Nights Survival Craft, Mcqueen Car Racing Game, Addon Pixelmon for MCPE, CoolCraft PE, Exploration Pro WorldCraft, San Andreas City Craft, Subway Banana Run Surf, Exploration Lite : Wintercraft, Addon GTA for Minecraft PE and Addon Sponge Bob for MCPE.
Google is facing an ongoing battle to remove inappropriate content from its products, including video streaming site YouTube. Last year there was public outcry when it emerged that disturbing videos were masquerading as popular children's cartoons like Peppa Pig.
YouTube said it would block and demonetise videos that tried to scare children or used children's television characters in frightening or disturbing scenarios. It has said it is hiring 10,000 staff to police YouTube for extreme and illegal content.