Cross-Origin restriction bypass with fetch using 302 redirection
Originally disclosed on Mozilla
- Fixed in 15 days
- Paid in 18 days
- Disclosed after 15 days
Created attachment 8665773
PoC-FF.html
User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0
Build ID: 20150921151815
Steps to reproduce:
1. Create a 302 redirect on owned server (http://evil.guy/redir) which contains a 'Location:' header pointing to the victims website (ex: Location: https://twitter.com/)
2. Create page (http://evil.guy/PoC.html) that contains the exploit code as well as two iframes, one empty and one pointing to '//twitter.com/' directly. (please see attached PoC-FF.html)
3. Modify 'PoC-FF.html' replacing 'http://localhost/redir.php' with your own 302 redirector.
4. Visit 'http://evil.guy/PoC-FF.html'
Actual results:
- The iframe with href='//twitter.com/' is immediately blocked (as expected)
- The second iframe, however, contains the full contents of twitter.com
If the victim was logged into twitter then the iframe will display him as logged in, successfully bypassing firefox's Cross-Origin security, as you can probably imagine, this is extremely unsafe for FireFox users.
Expected results:
Both iframes should have been blocked.
More precisely, the Fetch() function should not blindly follow 302 redirects but rather detect if a 302 is present then recheck origins.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is known
A high-severity business logic bug in DOM: Core & HTML. Mozilla made it public on 9 October 2015.
About Business logic
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.