RESOLVED DUPLICATE of bug 144157 144817
Origin HTTP header not set to null after following cross-origin redirect
https://bugs.webkit.org/show_bug.cgi?id=144817
Summary Origin HTTP header not set to null after following cross-origin redirect
Brad Hill
Reported 2015-05-08 15:58:55 PDT
The HTTP Origin header, described by https://tools.ietf.org/html/rfc6454, allows a server to determine a user agent's view of where a request originated from. RFC6454 allows this header to be multi-valued on redirects, but CORS (http://w3.org/TR/cors) implicitly requires it to be single-valued (because it specifies an exact string match comparison). All major user agents implement single-valued behavior, and because of this must set the header to 'null' when a redirect crosses same-origin boundaries. If the value of the original Origin is preserved after a 3xx redirect, it may result in a confused deputy vulnerability that allows bypass of CSRF protections. For example, the issue described at the following post is enabled by this incorrect behavior: http://sakurity.com/blog/2015/03/05/RECONNECT.html Test cases are available at the following URLs: https://www.webappsec-test.info/~bhill2/OriginRedir/test.php?redircode=302 https://www.webappsec-test.info/~bhill2/OriginRedir/test.php?redircode=303 https://www.webappsec-test.info/~bhill2/OriginRedir/test.php?redircode=307 https://www.webappsec-test.info/~bhill2/OriginRedir/test.php?redircode=308 WebKit is vulnerable by not setting Origin to null on cross-origin redirects on any 3xx status code which preserves the GET/POST payload. A similar issue was reported to Blink for status code 308, and has since been patched, see: https://code.google.com/p/chromium/issues/detail?id=465517
Attachments
Radar WebKit Bug Importer
Comment 1 2015-05-10 23:03:48 PDT
Alexey Proskuryakov
Comment 2 2015-05-11 12:29:58 PDT
*** This bug has been marked as a duplicate of bug 144157 ***
Note You need to log in before you can comment on or make changes to this bug.