
The affected sites contain posts that attempt to entice the readers to various child pornography websites, according to experts at Sophos.
The majority of pages are on legitimate web pages and one is even on a site designed for children.
The posts are all found on message boards within these sites and contain offensive words and hidden links to the illegal sites, the anti-virus software company said.
“Some of the same techniques that malware authors use in order to infect victims with malware are being used to distribute links and drive traffic to all sorts of web content," said Fraser Howard, principal virus researcher at Sophos.
“What's most worrying about these posts is that they're happening on legitimate sites. Any website can fall victim to an attack, no matter what the content.”
He said that this leaves all innocent web surfers, including children, vulnerable to such offensive material.
“The fact is that any unprotected website can be targeted by cybercriminals trying to spread their malicious content.
It is essential that web hosts remain vigilant for hackers' attacks, and deploy security solutions to defend against new and emerging threats."