Skip to content
Subdomain takeover Disclosed report Intermediate

Bulgaria - Subdomain takeover of mail.starbucks.bg

The mail.starbucks.bg subdomain pointed to an unclaimed mail service hosted by icn.bg, allowing the researcher to claim it and set up a working email server. The researcher could then send email from an @mail.starbucks.bg address, though the takeover was limited to mail hosting rather than full control of the subdomain.

nukedx Follow

Originally disclosed on HackerOne

High 8.4 View original
  • Triaged in 9 days
  • Fixed in 16 days
  • Paid in 9 days
  • Disclosed after 29 days

Summary by the program

nukedx discovered that the mail.starbucks.bg domain was pointing to a mail service from icn.bg and confirmed that icn.bg did not host this domain. nukedx successfully claimed the subdomain from icn.bg, configured login credentials through the web panel and setup a valid email server. nukedx then sent a successful test from an @mail.starbucks.bg email address as a valid POC.

@nukedx — thank you for reporting this vulnerability and confirming the resolution.

Summary by the researcher

I was checking Rapid7's fdns dataset for my academic research about cloud services and security issues related with them, a part of research is focused on subdomain hijacking, since Starbucks had some historic reports related to it, I scanned *.starbucks.* on entire dataset, figured out mail.starbucks.bg was pointing unclaimed service from icn.bg, claimed profile and successfully hijacked subdomain with it.

Unfortunately this was only giving mail hosting capabilities so it wasn't full subdomain takeover, kudos for Starbucks team to still accepting this and rewarding it despite being not full subdomain takeover.

It's always pleasure to report Starbucks, they always handle all reports professionally. I hope in future I'll work with them again.

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

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 4 min read.

Context

Starbucks has a subdomain, mail.starbucks.bg, that pointed at a mail service provided by a third party, icn.bg. The subdomain pointed at a mail service provided by a third party, icn.bg. That is a common arrangement: a DNS record for the subdomain delegates mail hosting to an external provider, and the provider's panel is where the mailbox is configured.

The report concerns that delegation. When a subdomain points at a service that is not actually claimed by anyone, whoever claims it first controls what the subdomain resolves to and what it serves. Here the service in question was a mail host, so the takeover gave mail hosting capabilities rather than control of a full website.

Setup

The researcher was working with Rapid7's fdns dataset as part of academic research into cloud services and the security issues associated with them. One part of that research focuses on subdomain hijacking. No special accounts, roles or tool versions are described beyond the dataset itself and the third-party mail provider's web panel, which the researcher used to claim the profile and configure credentials.

The precondition for the finding was that mail.starbucks.bg pointed at an unclaimed service from icn.bg.

Finding it

Starbucks had historic reports related to subdomain hijacking, so the researcher scanned the pattern *.starbucks.* across the entire fdns dataset. That scan surfaced mail.starbucks.bg pointing at an unclaimed service from icn.bg. The signal was a subdomain pointing at a service from icn.bg that did not host the domain.

Exploitation

Step 1: Claim the profile at the provider

The researcher claimed the profile at icn.bg for the service that mail.starbucks.bg was pointing to. This is the takeover step: the researcher claimed the unclaimed service behind the subdomain.

Step 2: Configure login credentials

Through the provider's web panel, the researcher configured login credentials for the claimed service. This established administrative control over the mail hosting tied to the subdomain.

Step 3: Set up a valid email server

With the profile claimed and credentials configured, the researcher set up a valid email server on the service. The subdomain now had working mail hosting under the researcher's control.

Step 4: Prove it with a test email

The researcher sent a successful test from an @mail.starbucks.bg email address. That message was the proof of concept: a successful test sent from an @mail.starbucks.bg address.

Root cause

The root cause is a dangling delegation: mail.starbucks.bg pointed at a mail service from icn.bg that Starbucks had not claimed. Because the provider allowed anyone to claim an unclaimed service and configure it through a web panel, control of the subdomain's mail hosting passed to the first person who did so.

The researcher notes that this was not a full subdomain takeover, because the claimed service only provided mail hosting capabilities. The researcher notes the team still accepted and rewarded the report despite that limitation.

Impact

An attacker who claims the service can configure it through the provider's web panel and operate a valid email server behind mail.starbucks.bg. In this case the researcher demonstrated that mail could be sent from an @mail.starbucks.bg address and accepted as valid. The impact is therefore confined to mail hosting for the subdomain: the report does not describe control of web content, and the researcher explicitly frames the result as short of a full subdomain takeover.

Fix

The program's summary thanks the researcher for confirming the resolution. It does not describe the specific change made, so the exact remediation is not stated.

Variants to test

  1. Scan for subdomains pointing at third-party providers and check whether the corresponding service is claimed. A positive result is a provider panel that lets you claim the service without any proof of ownership of the parent domain.
  2. Repeat the pattern across other mail-hosting providers, not just the one in this report. A positive result is the same: you can configure credentials and send mail from an address on the target's subdomain.
  3. Check other service types behind dangling records, such as web hosting or CDN profiles. A positive result is control of content served on the subdomain, which would be a fuller takeover than the mail-only case here.

Hunting notes

This kind of bug hides in DNS data rather than in application code. Large passive DNS and forward DNS datasets, such as the fdns dataset used here, let you enumerate a target's subdomains at scale and look for records pointing at external providers. The signal during recon is a subdomain whose DNS target belongs to a provider that does not appear to host the domain for the owner, combined with a provider that allows self-service claiming.

On impact, the researcher was candid that the result was mail hosting only and not a full subdomain takeover, and the program still accepted and rewarded it. The researcher set up a valid email server and sent a successful test from an @mail.starbucks.bg address.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 7 min read.

What happened, in plain words

Starbucks has a domain, starbucks.bg. One of the names under that domain, mail.starbucks.bg, pointed at a mail service run by another company, icn.bg. The name mail.starbucks.bg pointed at a mail service run by another company, icn.bg. This is normal: many organisations let an outside provider host their mail, and the provider gives them a control panel where they set up mailboxes.

The problem was that the service at icn.bg was unclaimed. The name mail.starbucks.bg pointed at the provider, but the mail service behind it was unclaimed. The provider allowed anyone to walk up and claim an unclaimed service. The researcher, nukedx, found this, claimed the service, configured login credentials, set up a valid email server and sent a successful test from an @mail.starbucks.bg address.

Because the service only did email, this was not a full takeover of a website. The researcher says so plainly, and notes the team still accepted and rewarded the report.

Context

A domain name like starbucks.bg is the address people type. A subdomain is a name placed in front of it, such as mail.starbucks.bg, used for one particular job. Here the job was email.

To make a subdomain work, the owner adds a DNS record. DNS is the internet's address book: it translates names people understand into the technical addresses computers use. A DNS record can also say "for this name, please talk to this other company's server". That is what happened: mail.starbucks.bg pointed at a mail service run by icn.bg.

The name pointed at a third party's mail service. The third party's web panel (a website where you log in and manage your service) is where the mailbox would normally be configured.

The bug lives in that handover. If a subdomain points at a service that nobody has actually claimed, then the first person to claim it controls what the subdomain does. This is called a subdomain takeover. In this case the service was a mail host, so the takeover gave mail hosting, not control of a full website.

Setup

The researcher was doing academic research into cloud services and the security problems that come with them. One part of that research looks at subdomain hijacking. The main tool described is Rapid7's fdns dataset, a large collection of DNS records gathered from across the internet. Think of it as a giant phone book of names and where they point, which you can search instead of looking up one name at a time.

No special accounts, roles or tool versions are described beyond that dataset and the third-party mail provider's web panel, which the researcher used to claim the profile and set credentials.

The only precondition for the finding was simple: mail.starbucks.bg pointed at a service at icn.bg that Starbucks had not claimed.

Finding it

Starbucks had historic reports related to subdomain hijacking, so the researcher searched the whole fdns dataset for names matching the pattern *.starbucks.*. The * symbols are wildcards: they stand for "anything here", so the pattern means "any name that has starbucks somewhere in the middle". Searching a whole dataset with a wildcard is like searching a library catalogue for every book whose title contains one word, rather than walking the shelves.

That search turned up mail.starbucks.bg pointing at an unclaimed service from icn.bg. The signal was a subdomain pointing at a service from icn.bg that did not host the domain. That is the dangling delegation pattern: the pointer is still there, but the thing it points at is unowned, so anyone can pick it up.

Exploitation

Step 1: Claim the profile at the provider

The researcher claimed the profile at icn.bg for the service that mail.starbucks.bg was pointing to. This is the takeover step. The service was unclaimed, so the first party to claim it got control of the service behind the subdomain. The everyday comparison is a flat with the door unlocked and no name on the lease: whoever signs first gets the keys.

Step 2: Configure login credentials

Through the provider's web panel, the researcher set login credentials for the claimed service. Credentials here means the username and password used to log in. Setting them configured login credentials for the claimed service.

Step 3: Set up a valid email server

With the profile claimed and credentials set, the researcher set up a valid email server on the service. The subdomain now had working mail hosting under the researcher's control. "Valid" matters: the researcher set up a working email server on the claimed service.

Step 4: Prove it with a test email

The researcher sent a successful test from an @mail.starbucks.bg email address. That message was the proof of concept (a small demonstration that the problem is real, rather than a claim on paper). The researcher sent a successful test from an @mail.starbucks.bg address.

Root cause

The root cause is a dangling delegation: mail.starbucks.bg pointed at a mail service from icn.bg that Starbucks had not claimed. Because the provider let anyone claim an unclaimed service and configure it through a web panel, control of the subdomain's mail hosting passed to the first person who did so.

The researcher notes that this was not a full subdomain takeover, because the claimed service only provided mail hosting. The researcher notes the team still accepted and rewarded the report despite that limitation.

Impact

An attacker who claims the service can configure it through the provider's web panel and run a valid email server behind mail.starbucks.bg. In this case the researcher showed that mail could be sent from an @mail.starbucks.bg address and accepted as valid. The impact is therefore limited to mail hosting for the subdomain. The report does not describe control of web content, and the researcher explicitly frames the result as short of a full subdomain takeover.

Fix

The program's summary thanks the researcher for confirming the resolution. It does not describe the specific change made, so the exact remediation is not stated.

Variants to test

  1. Scan for subdomains pointing at third-party providers and check whether the corresponding service is claimed. A positive result is a provider panel that lets you claim the service without any proof of ownership of the parent domain.
  2. Repeat the pattern across other mail-hosting providers, not just the one in this report. A positive result is the same: you can configure credentials and send mail from an address on the target's subdomain.
  3. Check other service types behind dangling records, such as web hosting or CDN profiles. A positive result is control of content served on the subdomain, which would be a fuller takeover than the mail-only case here.

Hunting notes

This kind of bug hides in DNS data rather than in application code. Large passive DNS and forward DNS datasets, such as the fdns dataset used here, let you list a target's subdomains at scale and look for records pointing at external providers. Passive DNS means records collected by watching DNS answers as they travel, rather than asking each name yourself; forward DNS means looking names up in the normal direction, from name to address.

The signal during recon (short for reconnaissance, the information-gathering phase before testing) is a subdomain whose DNS target belongs to a provider that does not appear to host the domain for the owner, combined with a provider that allows self-service claiming.

On impact, the researcher was candid that the result was mail hosting only and not a full subdomain takeover, and the program still accepted and rewarded it. The researcher set up a valid email server and sent a successful test from an @mail.starbucks.bg address.

Glossary

  • DNS: the internet's address book, translating names people type into the technical addresses computers use.
  • Domain: the main name of a site, such as starbucks.bg.
  • Subdomain: a name placed in front of a domain, such as mail.starbucks.bg, used for one job.
  • DNS record: an entry in DNS saying where a name points or which service handles it.
  • Delegation: handing a job, such as mail hosting, for a name to another company.
  • Dangling delegation: a DNS record that still points at a service nobody has claimed, so anyone can take it over.
  • Subdomain takeover: taking control of a subdomain by claiming the unowned service it points at.
  • Third-party provider: an outside company that runs a service on your behalf.
  • Web panel: a website where you log in to manage a service.
  • Credentials: the username and password used to log in.
  • Rapid7's fdns dataset: a large collection of DNS records gathered from across the internet, searchable in bulk.
  • Wildcard: a symbol such as * that stands for "anything here" in a search pattern.
  • Proof of concept: a small demonstration that a problem is real rather than theoretical.
  • Root cause: the underlying reason a problem exists.
  • Impact: what an attacker could actually do because of the problem.
  • Recon: reconnaissance, the information-gathering phase before testing.
  • Passive DNS: DNS records collected by watching answers as they travel, rather than looking each name up yourself.
  • Forward DNS: looking names up in the normal direction, from name to address.
  • CDN: a content delivery network, a service that stores and serves website content from many locations.

More by nukedx

View all

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

Subdomain takeover

The lesson behind this report.

A company's DNS still points at a cloud service it no longer uses, so anyone can claim it and serve content on the company's domain.