lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 22 Feb 2012 12:54:42 -0800
From: Michal Zalewski <lcamtuf@...edump.cx>
To: David Blanc <davidblanc1975@...il.com>
Cc: full-disclosure@...ts.grok.org.uk
Subject: Re: Pros and cons of
	'Access-Control-Allow-Origin' header?

> Does 'Access-Control-Allow-Origin' header provide any benefits in
> defending against cross site scripting attacks?

No. It's a mechanism to control cross-origin XMLHttpRequests (and some
other peripheral things), and adding it does not reduce the likelihood
or exploitability of XSS bugs.

If you use it incorrectly, you may end up removing most of the
security assurances provided by the same-origin policy, but that's a
separate topic.

> Doesn't 'Access-Control-Allow-Origin' header make any XSS flaw
> trivially exploitable? For example, if an attacker finds an XSS flaw
> in a web application, he can now inject a JavaScript with
> XMLHttpRequest that sends a request to attacker's web server which
> serves resources with the HTTP header "Access-Control-Allow-Origin:
> *". The browser would see this header and fetch the resource from the
> attacker's web server.

If you have an XSS vulnerability, there are many simpler ways to relay
data to an attacker-controlled site without the need to use CORS.

/mz

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ