The website of BusinessWeek magazine has suffered a major SQL injection attack in recent days that left it hosting malware from hundreds of its pages, Sophos has reported.

Once compromised by such a server hole, the attack scripts could, in principle, launch anything desired by the attacker, but currently included code for automatic attacks based on Javascript. This meant that a visitor would find themselves hit by malware just by landing on one of the pages, without the need to interact in any way.

Luckily, says Sophos, although code was still on the site the Russian website to which it had been pointing appeared to be non-functioning, although leaving the code in place meant that it could be re-activated at any time.

"BusinessWeek needs to get rid of these hundreds of pieces of malicious script as soon as possible, before a hacker puts malware up which would be activated by them," said Graham Cluley of Sophos.

The compromised part of the site is used by the magazine to advertise jobs to MBA graduates.

"BusinessWeek, and the many other firms hit by SQL injection attacks, need to move fast to not only remove the malicious scripts, but also to ensure that they do not get infected again. Companies whose websites have been struck by such an attack often clean-up their database, only to be infected again a few hours later," said Cluley.

Sophos has posted a video on its website that runs through the BuseinessWeek attack in more detail. In the video, Cluley points out that the attackers wouldn't have needed to target BusinessWeek specifically to have found the vulnerability from which the attacks sprang - a search engine could have been used to hunt down the vulnerable code.

The company was now finding 16,000 new malicious web pages every day, 90 percent of which were being hosted from legitimate sites, he said.

A web page attack of a related kind was used earlier in 2008 to undermine 500,000 legitimate websites in a period of days.