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

Issue 799747 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Oct 9
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 1
Type: Bug-Security



Sign in to add a comment

CSP bypass with blob URL

Reported by s.h.h.n....@gmail.com, Jan 6 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36

Steps to reproduce the problem:
1. Go to https://test.shhnjk.com/blobCSP.html

What is the expected behavior?
Script is blocked by CSP "script-src 'nonce-test'" (Firefox does).

What went wrong?
CSP is bypassed. Note that if the same blob URL is set to iframe or opened to new window, that's blocked correctly.

Source:
<meta http-equiv="content-security-policy" content="script-src 'nonce-test'">
<script nonce="test">
var attackerControlledString = "<script>alert(document.domain)<\/script>"; 
var blob = new Blob([attackerControlledString], {type : 'text/html'});
var url = URL.createObjectURL(blob);
location.href=url;
</script>

Did this work before? N/A 

Chrome version: 63.0.3239.132  Channel: stable
OS Version: OS X 10.13.2
Flash Version:
 
Components: Blink>SecurityFeature>ContentSecurityPolicy
Labels: OS-Android OS-Chrome OS-Linux OS-Windows
Labels: Security_Severity-Medium Security_Impact-Stable
Owner: andypaicu@chromium.org
Status: Assigned (was: Unconfirmed)
andypaicu@ I think this problem looks similar to (but not quite the same as) issue 756962, could you please take a look?

Feel free to reassign if it makes more sense for someone else to take a look.
Project Member

Comment 3 by sheriffbot@chromium.org, Jan 7 2018

Labels: M-64
Project Member

Comment 4 by sheriffbot@chromium.org, Jan 7 2018

Labels: -Pri-2 Pri-1
Project Member

Comment 5 by sheriffbot@chromium.org, Jan 21 2018

andypaicu: Uh oh! This issue still open and hasn't been updated in the last 14 days. This is a serious vulnerability, and we want to ensure that there's progress. Could you please leave an update with the current status and any potential blockers?

If you're not the right owner for this issue, could you please remove yourself as soon as possible or help us find the right one?

If the issue is fixed or you can't reproduce it, please close the bug. If you've started working on a fix, please set the status to Started.

Thanks for your time! To disable nags, add the Disable-Nags label.

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

Comment 6 Deleted

>This also bypasses CSP sandbox such as modals without allow-modals. 
Should I report sandbox bypass as different bug?
Project Member

Comment 8 by sheriffbot@chromium.org, Feb 4 2018

andypaicu: Uh oh! This issue still open and hasn't been updated in the last 28 days. This is a serious vulnerability, and we want to ensure that there's progress. Could you please leave an update with the current status and any potential blockers?

If you're not the right owner for this issue, could you please remove yourself as soon as possible or help us find the right one?

If the issue is fixed or you can't reproduce it, please close the bug. If you've started working on a fix, please set the status to Started.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Is andypaicu@ working on this case?
It's in my backlog but I have not started working on it.
Project Member

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

Labels: -M-64 M-65
Just FYI, I would like to publish this bug on November if fixed. It’d be great if this bug could be fixed before that. Thanks!
Project Member

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

Labels: -M-65 M-66
Project Member

Comment 14 by sheriffbot@chromium.org, May 30 2018

Labels: -M-66 M-67
Project Member

Comment 15 by sheriffbot@chromium.org, Jul 25

Labels: -M-67 Target-68 M-68
>It's in my backlog but I have not started working on it.
Seems like your backlog is too big :P
Project Member

Comment 17 by sheriffbot@chromium.org, Sep 5

Labels: -M-68 M-69 Target-69
Status: Started (was: Assigned)
Project Member

Comment 19 by bugdroid1@chromium.org, Oct 9

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d683fb12566eaec180ee0e0506288f46cc7a43e7

commit d683fb12566eaec180ee0e0506288f46cc7a43e7
Author: Andy Paicu <andypaicu@chromium.org>
Date: Tue Oct 09 12:25:52 2018

Inherit CSP when self-navigating to local-scheme URL

As the linked bug example shows, we should inherit CSP when we navigate
to a local-scheme URL (even if we are in a main browsing context).

Bug:  799747 
Change-Id: I8413aa8e8049461ebcf0ffbf7b04c41d1340af02
Reviewed-on: https://chromium-review.googlesource.com/c/1234337
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Andy Paicu <andypaicu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597889}
[add] https://crrev.com/d683fb12566eaec180ee0e0506288f46cc7a43e7/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/inheritance/blob-url-self-navigate-inherits.sub.html
[add] https://crrev.com/d683fb12566eaec180ee0e0506288f46cc7a43e7/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/inheritance/support/navigate-self-to-blob.html
[add] https://crrev.com/d683fb12566eaec180ee0e0506288f46cc7a43e7/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/inheritance/support/navigate-self-to-blob.html.sub.headers
[modify] https://crrev.com/d683fb12566eaec180ee0e0506288f46cc7a43e7/third_party/blink/renderer/core/dom/document.cc
[modify] https://crrev.com/d683fb12566eaec180ee0e0506288f46cc7a43e7/third_party/blink/renderer/core/dom/document.h
[modify] https://crrev.com/d683fb12566eaec180ee0e0506288f46cc7a43e7/third_party/blink/renderer/core/dom/document_init.cc
[modify] https://crrev.com/d683fb12566eaec180ee0e0506288f46cc7a43e7/third_party/blink/renderer/core/dom/document_init.h
[modify] https://crrev.com/d683fb12566eaec180ee0e0506288f46cc7a43e7/third_party/blink/renderer/core/loader/document_loader.cc
[modify] https://crrev.com/d683fb12566eaec180ee0e0506288f46cc7a43e7/third_party/blink/renderer/core/loader/document_loader.h

Status: Fixed (was: Started)
>>It's in my backlog but I have not started working on it.
>Seems like your backlog is too big :P
Tell me about it
Project Member

Comment 21 by sheriffbot@chromium.org, Oct 9

Labels: -Restrict-View-SecurityTeam Restrict-View-SecurityNotify
>>>It's in my backlog but I have not started working on it.
>>Seems like your backlog is too big :P
>Tell me about it
When you have huge backlog, it'll be difficult for you to fully concentrate on each task :) See issue 894228
I don't seem to have permissions for that bug.

Comment 24 Deleted

@andypaicu: I've added you as owner on the new bug.
Labels: -M-69 -Target-68 -Target-69 Target-71 M-71
Labels: reward-topanel
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.
*********************************
Thanks as ever, $1,000 for this report :-)
Labels: -reward-unpaid reward-inprocess
Project Member

Comment 31 by sheriffbot@chromium.org, Oct 26

Labels: Merge-Request-71
Project Member

Comment 32 by sheriffbot@chromium.org, Oct 26

Labels: -Merge-Request-71 Hotlist-Merge-Review Merge-Review-71
This bug requires manual review: M71 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: benmason@(Android), kariahda@(iOS), kbleicher@(ChromeOS), govind@(Desktop)

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

Comment 33 Deleted

Labels: -Hotlist-Merge-Review -Merge-Review-71
Labels: Release-0-M71
Labels: CVE-2018-18350 CVE_description-missing
Labels: -CVE_description-missing CVE_description-submitted
Project Member

Comment 38 by sheriffbot@chromium.org, Jan 15

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