New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 821640 link

Starred by 1 user

Issue metadata

Status: Verified
Owner: ----
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 1
Type: Bug-Security



Sign in to add a comment

CSP bypass by navigating same-origin page to JavaScript URI

Reported by s.h.h.n....@gmail.com, Mar 14 2018

Issue description

Steps to reproduce the problem:
1. Go to https://test.shhnjk.com/open_java.html
2. Click go button.
3. On the new tab, click go button again.

What is the expected behavior?
No alert should appear.

What went wrong?
CSP is bypassed by navigating Same-origin but not CSPed page to Javascript URL. See issue 756040 for more details.

Did this work before? N/A 

Chrome version: 65.0.3325.152  Channel: stable
OS Version: iOS 11.2.6
Flash Version:
 
Cc: andypaicu@chromium.org droger@chromium.org mkwst@chromium.org
Components: Blink>SecurityFeature>ContentSecurityPolicy

Comment 2 by mkwst@chromium.org, Mar 14 2018

Ah. My good friend iOS. I don't think there's much we're going to be able to do about this, as we're reliant on WebKit's CSP implementation.

Have you filed a similar bug against WebKit?

Comment 3 by mkwst@chromium.org, Mar 14 2018

Labels: Security_Impact-Stable Security_Severity-Medium
(That said, I don't get an alert on iOS either. Looking at the code, I'm not sure how the bypass is expected to work. Did you change the PoC in the meantime?)
I believe this is just issue 756040 re-raised for iOS specifically. This is an issue we fixed in August, I imagine that it might not be fixed in webkit.

The issue is you're basically allowed to execute inline scripts by simply opening a window with a javascript: uri.

We have this issue and 3 more raised recently around CSP and iOS. Is there are anything we can do on our side or is it just up to WebKit?
(Security sheriff) Thanks for taking a look here, I suspected that we might not be able to do much about these iOS CSP bugs.

It's a bit unfortunate, but I see two ways forward here:

1. close all of these iOS CSP bugs, and advise the reporter to contact WebKit?
2. we, as a consumer of WKWebView report to WebKit (in which case we could leave these open to flag in the report)

Thoughts?
>Have you filed a similar bug against WebKit?
I filed a worse bug to them where CSP is just bypassed by window.open("javascript:alert(1)"). They fixed it but this bug was still reproducible, so I told them that fix is incomplete and they filed their internal bug which I don't have visibility.

>(That said, I don't get an alert on iOS either. Looking at the code, I'm not sure how the
>bypass is expected to work. Did you change the PoC in the meantime?)
I re-tested and It's working in my iPhone 8. What do you see when you click the 2nd button?

>It's a bit unfortunate, but I see two ways forward here:
Attaching email conversation with palmer@. 
Project Member

Comment 7 by sheriffbot@chromium.org, Mar 14 2018

Labels: M-65

Comment 8 by mkwst@chromium.org, Mar 14 2018

Cc: palmer@chromium.org
Yup. I agree with Chris that bugs in Chrome on iOS are covered in the VRP as it's written today. I worry a bit about our ability to actually do anything about bugs in WebKit's web platform support (including security features like parsing changes, Fetch hardening, CSP, mixed content handling, etc.). I poked at folks internally to see if I'm wrong about the options I see, none of which I'm happy about.

Comment 9 by palmer@chromium.org, Mar 14 2018

Cc: danyao@chromium.org
Project Member

Comment 10 by sheriffbot@chromium.org, Mar 15 2018

Labels: -Pri-2 Pri-1
I saw that other issues are marked as ExternalDependency. So is it formally confirmed that Chrome for iOS webkit bugs are eligible for bounty?
Cc: awhalley@chromium.org a...@apple.com ddkil...@apple.com
Components: -Blink>SecurityFeature>ContentSecurityPolicy
Status: ExternalDependency (was: Unconfirmed)
+awhalley for comment on #11
This bug seems to be fixed by iOS 11.3 update.

Comment 14 by ddkil...@apple.com, Mar 29 2018

> Yup. I agree with Chris that bugs in Chrome on iOS are covered in the VRP as it's written today. I worry a bit about our ability to actually do anything about bugs in WebKit's web platform support (including security features like parsing changes, Fetch hardening, CSP, mixed content handling, etc.). I poked at folks internally to see if I'm wrong about the options I see, none of which I'm happy about.

I realize you're probably talking about working around bugs in older iOS releases, but please report bugs via bugs.webkit.org or product-security@apple.com as soon as they're known. Reporting them here has a much smaller chance that they'll be noticed and fixed.

Hi, could anyone confirm the fix and mark as fixed?
#14: OK, noted.

#15: I don't know if it is fixed yet.
Project Member

Comment 17 by sheriffbot@chromium.org, Apr 18 2018

Labels: -M-65 M-66
Status: Verified (was: ExternalDependency)
Looks fixed in or before 11.3.1
Project Member

Comment 19 by sheriffbot@chromium.org, Apr 28 2018

Labels: -Restrict-View-SecurityTeam Restrict-View-SecurityNotify
Labels: reward-topanel
Project Member

Comment 21 by sheriffbot@chromium.org, May 1 2018

Labels: Merge-Request-67
Project Member

Comment 22 by sheriffbot@chromium.org, May 1 2018

Labels: -Merge-Request-67 Merge-Review-67 Hotlist-Merge-Review
This bug requires manual review: Less than 24 days to go before AppStore submit on M67
Please contact the milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), kbleicher@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Hotlist-Merge-Review -Merge-Review-67 Merge-Rejected-67
(nothing to merge here)
Components: Blink>SecurityFeature>ContentSecurityPolicy
Adding component for the sake of posterity.
Labels: -reward-topanel reward-unpaid reward-1000
*** Boilerplate reminders! ***
Please do NOT publicly disclose details until a fix has been released to all our users. Early public disclosure may cancel the provisional reward. Also, please be considerate about disclosure when the bug affects a core library that may be used by other products. Please do NOT share this information with third parties who are not directly involved in fixing the bug. Doing so may cancel the provisional reward. Please be honest if you have already disclosed anything publicly or to third parties. Lastly, we understand that some of you are not interested in money. We offer the option to donate your reward to an eligible charity. If you prefer this option, let us know and we will also match your donation - subject to our discretion. Any rewards that are unclaimed after 12 months will be donated to a charity of our choosing.
*********************************
Nice one  s.h.h.n.j.k@ - $1,000 for this report.
Wow! This is great! Time to secure “Chrome for iOS” :)
Labels: -reward-unpaid reward-inprocess
Project Member

Comment 29 by sheriffbot@chromium.org, Aug 4

Labels: -Restrict-View-SecurityNotify allpublic
This bug has been closed for more than 14 weeks. Removing security view restrictions.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment