to know that this should not be possible with XHR (see, for example, “Security for sharing resources between different sources”), at least not if we trust the W3C specification, which will be correctly implemented in all modern browsers (we can are we?)
At the end of the day, you need to “trust” the client browser to securely store user data and protect the client side of the session. If you do not trust the client’s browser, you should stop using the website at all for anything other than static content. Even with CSRF tokens, you trust the client’s browser to correctly obey a policy of the same origin .
Despite previous browser vulnerabilities, such as those found in IE 5.5 / 6.0 , where attackers could circumvent a policy of the same origin and execute attacks, you can usually expect them to be fixed as soon as they are detected, and with most browsers automatically updated, this risk will be largely mitigated.
But what about other types of requests - for example, a form to send? Loading tag script / img / ...? Or any other way a page can use (legally) creating a request? Or maybe some famous JS hacks?
The Origin header is usually sent only for cross-domain XHR requests. Image requests do not contain a header.
Note: I am not talking about
I'm not sure if this falls under manipulated browsers or not, but older versions of Flash allow you to set arbitrary headers that allow an attacker to send a request with a fake referer from the victim machine to carry out the attack.
SilverlightFox Jul 11 '14 at 7:40 2014-07-11 07:40
source share