Researcher: Twitter fails to fix cross-site scripting bug

Hackers can hijack accounts more simply by getting people to view a tweet, he says

A vulnerability in the popular microblogging Twitter service remains unfixed and can be used by criminals to hijack accounts or redirect users to malicious Web sites, a developer claimed today.

James Slater, a software developer who blogs on the site of David Taylor, a U.K.-based search optimization specialist, said that Twitter has not successfully plugged a hole he disclosed yesterday.

The cross-site scripting bug in Twitter allows hackers to insert malicious JavaScript into tweets simply by adding code to a field of an API (application programming interface) used by third-party Twitter application developers.

Developers use the API to direct Twitter users to their Web sites by embedding links in tweets created with their software. The link appears in the text at the bottom of each tweet, such as "37 minutes ago from Tweetie," where Tweetie is the third-party application.

Shortly after Slater revealed the vulnerability Tuesday, John Adams, of Twitter's operations staff, said the service had quashed the bug. However, today, Slater said the vulnerability had not been fixed.

"Simply by seeing one of these [malformed] tweets, code can be run inside your browser impersonating you and doing anything that your browser can do," Slater said as he ticked off several possibilities, ranging from redirecting users to pornographic sites, sending a message to all of a user's followers or transmitting log-in details for Twitter as well as other Web sites or services.

"If I tweet something, all of my followers will see it instantly," Slater added. "[So] do you trust everyone you're following?"

Slater said that Twitter's bug fix only prevented hackers from putting spaces in the address box that builds the link to the third-party application.

"Other than that, everything else is fair game," Slater said. He also provided a demonstration using a dummy Twitter account, which Twitter has since suspended , as it did with the account he used Tuesday to illustrate the original exploit.

One user commenting on Slater's post of today said it appeared that Twitter had completely patched the problem.

"Looks like it's been fixed, recent tweets containing code characters get converted to their HTML code equivalent," said Scott Bowler, who said he works at a U.K.-based Web site design and consulting company.

Twitter did not reply to e-mail asking if it had, in fact, fixed the flaw.

Slater recommended that, pending Twitter patching the vulnerability, users ditch any followers they don't personally know or trust.

"Who's to say they're not already stealing your details? If you don't see their tweets they can't harm you," he said. Slater also urged people to use a trusted third-party application to view tweets, rather than relying on the Twitter Web site.

Twitter has had its share of problems this month. Three weeks ago, a determined distributed denial-of-service attack took the service offline for several hours, and crippled third-party applications for several days after that.

Join the CSO newsletter!

Error: Please check your email address.

Tags XSSsecuritybugstwitter

Show Comments

Featured Whitepapers

Editor's Recommendations

Solution Centres

Stories by Gregg Keizer

Latest Videos

More videos

Blog Posts