CVE-2017-8592 – XMLHttpRequest in IE followed 307 redirections with additional or customised headers
Internet Explorer and Edge followed 307 redirects on XMLHttpRequest while keeping custom headers that JavaScript had set, which browsers normally strip or block. An attacker could therefore send cross-site requests with unusual Content-Type values, defeating CSRF defences that relied only on that header check.
soroush.me
Published on soroush.me
If you are doing web application security assessments, you probably have seen many APIs that do not have any cross-site request forgery (CSRF) protections other than checking the Content-Type header.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the browser re-sent the original request headers, including script-set ones, when following a 307 redirect instead of applying the normal cross-origin header restrictions.
Impact
An attacker could bypass CSRF protections that only check the Content-Type header, though the issue was limited to Internet Explorer and Edge and was patched in July 2017.
What the attacker needed
Victim uses Internet Explorer or Edge; victim visits attacker page; target relies only on Content-Type
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Many websites protect against forged requests by only accepting certain content types, assuming a browser will not let another site send anything else. This bug meant the browser did let a page set its own headers and kept them even after a redirect, so a malicious page could make the request look legitimate.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.