The worms were particularly virulent because victims didn’t need to click on a link to spread them to their followers. All they had to do was hover over a specially written link sent in a Twitter message. That was enough to execute the malicious code.

“Probably hundreds of thousands of people were affected,” said Beth Jones, a senior threat researcher with Sophos, which was early to report the issue. The cause: a basic Web programming error that allowed Twitter users to add JavaScript to their tweets.

It turns out that the whole mess could easily have been avoided. Indeed, it should have been.

“We discovered and patched this issue last month,” Twitter said in a blog post Tuesday. “However, a recent site update (unrelated to new Twitter) unknowingly resurfaced it.”

White House Press Secretary Robert Gibbs was also hit. “My Twitter went haywire—absolutely no clue why it sent that message or even what it is,” he wrote in a Twitter message. “[P]aging the tech guys…”

“The vast majority of exploits related to this incident fell under the prank or promotional categories,” Twitter said in its blog posting. “Users may still see strange retweets in their timelines caused by the exploit. However, we are not aware of any issues related to it that would cause harm to computers or their accounts. And, there is no need to change passwords because user account information was not compromised through this exploit.”

Computerworld’s Gregg Keizer contributed to this report.

To comment on this article and other Macworld content, visit our Facebook page or our Twitter feed.