The ability for extensions to manipulate Cross-Origin Resource Sharing (CORS) headers disables the Same Origin Policy in browsers
Reported by
emos.ere...@gmail.com,
Oct 19
|
|||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36 Steps to reproduce the problem: 1. Install this extension 2. Navigate to any webpage 3. Open the console and make any cross-origin request What is the expected behavior? If the server does not support CORS, then no data is returned What went wrong? The extension is adding the necessary CORS headers and making the request successful WebStore page: https://chrome.google.com/webstore/detail/corser/elgclnafddmkhhnhlfgfahgbahkginga Did this work before? N/A Chrome version: 70.0.3538.67 Channel: stable OS Version: Flash Version: This extension is part of a research we are doing on the ability for extensions to tamper with CORS headers. The consequence of this capability is that extensions can then disable the Same Origin Policy in browsers regarding cross-origin requests. This allows any script running in the user browser to make successful cross-origin requests even to servers that do not allow such requests. We created this CORSER extension to test whether it is a problem from browser vendors perspective to publish such an extension that disables the SOP in browsers. The answer is no. We also found many other extensions in the Chrome webstore that also disables the SOP in browsers by tampering with CORS headers. But more surprisingly, we found some that break legitimate CORS requests because of harsh modifications of CORS headers.
,
Oct 19
,
Oct 24
Tried testing issue on reported chrome version #70.0.3538.67 using Ubuntu 17.10 by following below steps. Steps: ===== 1.Launched chrome and installed extension "https://chrome.google.com/webstore/detail/corser/elgclnafddmkhhnhlfgfahgbahkginga". 2.Navigated to "https://fiddle.sencha.com/#fiddle/kvu&view/editor". 3.Opened devtools -> Console. 4.Clicked on "Submit CORS" button. 5.In console entered "cross-origin" and observed an error "Uncaught ReferenceError: cross is not defined". Attached screencast for reference. @reporter: Could you please review attached screencast and let us know if anything is being missed from our end. If possible request you a sample file/URL and screenshot/screencast of the issue. Thanks.!
,
Oct 26
There are 4 mistakes in your demo that makes it to fail (See detailed explanation in the attached file) What you can do instead is the following. Replace http://updates.html5rocks.com with https://developers.google.com/web/updates/ Therefore, you will making an HTTPS AJAX request from an HTTPS webpage. Moreover, http://updates.html5rocks.com redirects to https://developers.google.com/web/updates/ so you will get what you are looking for Please consider trying my JS file instead. It gives you more control over AJAX requests.
,
Oct 26
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Nov 2
Thanks for the feedback... As per attached file chromium.js in the comment #4, it is not possible to test the issue with .js file from test team. Hence requesting you to provide a sample URL/ html test file, so that we can investigate the issue further. Thanks.!
,
Nov 2
Here is a link to test the extension - https://jsfiddle.net/ekj0xq1h/7/ Please install the extension, enter the URL to fetch, and hit "Submit". The response to the request is displayed in the textarea
,
Nov 2
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Nov 9
Thanks for the feedback... As per comment #7, retried the issue on reported chrome 70.0.3538.67 and latest chrome 70.0.3538.77 using ubuntu 14.04. Attaching screenshot for reference. Steps: ----- 1. Launched chrome 2. Installed the extension 3. Navigated to given URL https://jsfiddle.net/ekj0xq1h/7/ and clicked on "Submit As we have observed response on the textarea @Reporter: Could you please check the attached screenshot and please let us know if anything missed from our end. Thanks..!
,
Nov 9
It's all good :-)
,
Nov 9
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Nov 12
Thanks for the feedback... @Reporter: Could you please upgrade to latest chrome stable 70.0.3538.102, you can download latest chrome builds here:" https://www.chromium.org/getting-involved/dev-channel ". Let us know whether issue still persists. If not seen can you please confirm that we can close the issue from our end.
,
Nov 12
I upgraded Chrome to version 70.0.3538.102 as you can see from my new User-agent "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36" The issue is still there. Do you mind explaining how you tried to fix the issue ?
,
Nov 12
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Nov 13
As per comment #7, comment #9 and comment#10, Able to reproduce the issue on reported chrome version 70.0.3538.67 and latest stable 70.0.3538.102 also on latest chrome 72.0.3608.0 using Mac 10.14.0, Ubuntu 17.10 and Windows 10. Same behavior is seen on M60(60.0.3112.113) hence considering it as non-regression and marking it as Untriaged. Thanks!
,
Nov 16
I have also thought about this and it seems to me that introducing another permission might make sense if we have seen this capability being used maliciously. It would aid in static analysis of the extension package. That said, I don't think permissions like these can be shown as part of permission messages to the user. cc'ing some folks who might have thoughts about this.
,
Nov 19
Thank you for providing feedback ! Such permissions would definitely help during review process. For the average user, showing such permissions would not make any sense, but for someone who can understand, I think it's worth it ! Anyway, let's see what the folks think about that.
,
Dec 4
Might be useful to add usage stats to determine how common this is .
,
Dec 24
A few extensions I found manipulating CORS headers can be found in the file attached ! |
|||||||||||||
►
Sign in to add a comment |
|||||||||||||
Comment 1 by emos.ere...@gmail.com
, Oct 19