Twitter 'onMouseOver' security flaw widely exploited

Filed Under: Malware, Social networks, Spam, Twitter, Video

The Twitter website is being widely exploited by users who have stumbled across a flaw which allows messages to pop-up and third-party websites to open in your browser just by moving your mouse over a link. In a worrying development, messages are also spreading virally exploiting the cross-site-scripting (XSS) vulnerability without the consent of users.

Thousands of Twitter accounts have posted messages exploiting the flaw. Victims include Sarah Brown, wife of the former British Prime Minister.

Sarah Brown's Twitter page

It appears that in Sarah Brown's case her Twitter page has been messed with in an attempt to redirect visitors to a hardcore porn site based in Japan. That's obviously bad news for her followers - over one million of them.

Japanese porn website

To Mrs Brown's credit, she has posted a warning on her Twitter page:

don't touch the earlier tweet - this twitter feed has something very odd going on ! Sarah

Here's an example of a Twitter profile which is using the exploit to pop-up a message.

Twitter security flaw popping up a message box

It looks like many users are currently using the flaw for fun and games, but there is obviously the potential for cybercriminals to redirect users to third-party websites containing malicious code, or for spam advertising pop-ups to be displayed.

Here's a quick YouTube video I made demonstrating the exploit live on Twitter:

(Enjoy this video? You can check out more on the SophosLabs YouTube channel and subscribe if you like)

Hopefully Twitter will shut down this loophole as soon as possible - disallowing users to post the onMouseOver JavaScript code, and protecting users whose browsing may be at risk.

Some users are also seemingly deliberately exploiting the loophole to create tweets that contain blocks of colour (known as "rainbow tweets"). Because these messages can hide their true content they might prove too hard for some users to resist clicking on them.

Rainbow Tweet exploiting security flaw

Right now you might be safer using a third-party Twitter client rather than the website.

Update Twitter says that it is aware of the problem, and hopes to roll out a patch soon.

Response from Twitter

Update 2 Twitter has posted a blog entry going into some detail of what happened, and how it says it has now fixed the problem.

Which means that - if you like - you should be safe to follow me on Twitter at @gcluley to keep up-to-speed on the latest security threats. :) Take care folks.

, , , , ,

You might like

4 Responses to Twitter 'onMouseOver' security flaw widely exploited

  1. skelter79 · 1627 days ago

    Why the hell when I go visit a twitter now, it changes the adress into another one, containing a '#!' and then the pages are shown in a weird way? For example, if I visit, which is the right address of Obama's official twitter, it automatically changes into!/BARACKOBAMA, and the page is shown in a weird way, different than the usual. Is it a normal chang they are making in the microblog or it could be a threat related to malware here on my computer, for example? Thank you very much for these tips.

    • That's not malicious. That's the "new Twitter" design.

      • skelter79 · 1627 days ago

        Hi Graham,

        Thank you very much! I was already getting annoyed due to that (LOL). Cos I had problem with malware here, and it was during the same time when I had visited some twitters and they appeared in that different way, a coincidence then. Maybe it was when they were testing the new layout then. Cos some days later the layout was back to the old style again, and as I had cleaned the computer, in my crazy mind I thought it was due to the malwares which had infected my computer that time, hehe. But, thank you anyway. Now I can relax. Thank you! And keep it up, your work is fine.

  2. TomCruser · 926 days ago

    Just the same old story ... new design = new bugs = new exploits

    It's a never ending story of the baddies looking for chinks in the armour.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

About the author

Graham Cluley runs his own award-winning computer security blog at, and is a veteran of the anti-virus industry having worked for a number of security companies since the early 1990s. Now an independent security analyst, he regularly makes media appearances and gives computer security presentations. Follow him on Twitter at @gcluley