We have published a more detailed account of how these ads appeared on NYTimes.com, with a look at the larger issues with security and ads.

The New York Times Company said on Monday that NYTimes.com was the victim of an attacker who first posed as a legitimate advertiser, then started hitting site visitors with aggressive advertisements that appeared to be warnings about viruses.

“Over the weekend, NYTimes.com was the victim of a malware attack that targeted several news organizations,” Diane McNulty, a spokeswoman for the company, said in a statement in response to questions about the rogue ads. “The culprit masqueraded as a national advertiser and provided seemingly legitimate product advertising for a week. Over the weekend, the ad being served up was switched so that an intrusive message, claiming to be a virus warning from the reader’s computer, appeared.”

Ms. McNulty said that in response to the problem, The Times suspended advertising that is inserted automatically into its pages by outside ad-placement companies, and posted a notice about the attack. “We now know how it occurred and have taken steps to prevent a similar situation from happening,” she said.

We are posting information on what to do if you saw one of these ads on the Gadgetwise blog.