SameSite cookie bypass via link inside iframe
A SameSite Strict cookie was sent when a user clicked a link inside an iframe, bypassing the intended restriction. An attacker could exploit this to send the cookie on cross-site requests if they can frame a page that allows arbitrary links.
- Fixed in 5 days
- Paid in 11 days
- Disclosed after 5 days
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36
Steps to reproduce:
1. Go to https://shhnjk.azurewebsites.net/SameSite.php (Sets SameSite cookie)
2. Go to https://shhnjk.azurewebsites.net/iframer.php?url=//test.shhnjk.com/open.php?url=//shhnjk.azurewebsites.net/SameSite.php
3. Click normal link
Actual results:
SameSite Strict cookie sent.
Expected results:
If victim site allows frames where attacker can place arbitrary link, SamSite Stirct cookie can be bypassed.
PS:
Another bug I had was Data URL issue which seems to be found by Gijs :(
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the browser's SameSite enforcement did not account for link clicks initiated from within a framed context, treating the navigation as same-site.
What the attacker needed
Victim site allows framing; attacker can place a link in the frame; victim clicks the link
How it was found
- Visit a page that sets a SameSite cookie.
- Visit a page that embeds an iframe pointing to a page with a link to the cookie-setting page.
- Click the link inside the iframe.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
SameSite is a cookie setting that stops a browser from sending the cookie when you click a link from another website. This report shows that if the link is inside an iframe, the browser still sends the cookie, so the protection fails.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.