XSS Attack on Reddit

Playing around in Reddit tonight I found several threads being attacked by what appears to be an XSS (cross site scripting) virus. If you go to these threads and view the code being put out by the script, it will take over your commenting and replies for the thread outputing the same code.

The best thing to do now if you are a Reddit user is to install No Script for Firefox.

Update: From Reddit

They seem to have converted some javascript code into html escaped characters and got the browser to interpret it somehow. When I open my received messages it instantly tries to post a reply to every message on that page thus spreading itself.

Edit – there was a submission to programming earlier today (I think) that I can no longer find that had a similar if much less sophisticated attack. That one relied on people being stupid enough to copy and paste the code into the brower address bar. I suppose someone found an exploit and used his idea.

Decoding the script which is URL encoded gives us this;


Un-encoded it looks like;


Seems like the comment spam detector is removing the vast majority of it. Don’t be suprised if reddit goes down from this though.