Twitter ‘onMouseOver’ security flaw widely exploited

Twitter 'onMouseOver' security flaw widely exploited

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.