Skip to content
Subdomain takeover Disclosed report Beginner

Subdomain takeover on http://fastly.sc-cdn.net/

A DNS record for a Snapchat CDN subdomain still pointed to a Fastly service that had been cancelled, allowing an attacker to claim the service and control the subdomain. The reporter confirmed the takeover but noted the domain appeared unused, so the risk was minimal.

ebrietas Follow

Originally disclosed on HackerOne

Bounty$3,000 View original
  • Triaged in 12 days
  • Fixed in 21 days
  • Paid in 21 days
  • Disclosed after 26 days

Hey team,

I've found a snapchat cdn domain here which had a test instance of fastly setup but did not remove the dns record when the service was cancelled. This allowed me to create a Fastly instance to take it over. I've confirmed this is a snapchat property via Censys (https://censys.io/certificates/65ba2e172a1eb85eb1071c9fd7a4e8371ef12625409890507c89a54978305558) though the risk here seems minimal at best as this domain does not appear to be used anywhere on any snapchat properties.

Repro steps:

Recommended fix: Removal of this record is recommended.

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

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 5 min read.

What the report shows

The target is a Snapchat CDN hostname, fastly.sc-cdn.net, which had been pointed at a Fastly test instance. When the Fastly service was cancelled, the DNS record was left in place. The researcher noticed the dangling record and was able to register a Fastly instance that answered for the hostname, taking it over.

The researcher confirmed that the hostname belonged to Snapchat by checking a certificate record on Censys:

Text
https://censys.io/certificates/[redacted]

The report is candid about the limits of the finding: the risk "seems minimal at best", because the domain did not appear to be used anywhere on any Snapchat properties.

The reproduction step is a single request:

The reproduction step is to visit http://fastly.sc-cdn.net/takeover.html.

The recommended fix was simply to remove the DNS record. The report was disclosed on 22 August 2016, was classified as a violation of secure design principles, and paid a bounty of 3,000 USD. No CVSS score is given.

Root cause

The likely cause is an orphaned DNS record. A hostname was pointed at a Fastly test instance, and when that service was cancelled the DNS entry was not cleaned up. and when that service was decommissioned the DNS entry was not cleaned up. Because the provider lets customers create services, a new account can recreate the endpoint the record still points at. The DNS record then resolves to infrastructure the original owner no longer controls.

Impact

The report keeps the impact deliberately narrow. The researcher was able to create a Fastly instance that answered for the hostname, which is enough to prove control of the name. The practical risk depends entirely on whether anything trusts that hostname: links, scripts, cookies scoped to the parent domain, or allowlists that include the domain. Here the researcher states the domain did not appear to be used on any Snapchat property, so the realistic impact was low. A takeover of a hostname that is actually referenced would be a different matter, since content served from it would inherit the trust of the parent domain.

How this kind of bug works

Subdomain takeover exploits a mismatch between DNS and the service it points to. A DNS record is a promise that a name resolves to a particular provider endpoint. When the provider-side resource behind that endpoint is deleted but the DNS record survives, the promise is broken: the name still resolves, but nothing legitimate answers for it. Many providers allocate endpoint names deterministically or allow customers to choose them, so a new account can recreate the same endpoint name and start answering requests for the orphaned hostname.

The bug class is not limited to CDNs. It appears wherever a DNS record points at a hosted service that can be re-registered: object storage buckets, static site hosting, platform-as-a-service apps, marketing and form tools, and similar. The common thread is that the DNS record outlives the resource it references.

Defences are mostly operational: inventory every DNS record that points at a third party, tie record lifetime to resource lifetime, and remove records as part of decommissioning. Some providers offer domain-claim or verification mechanisms that prevent a second party from claiming a name that another account has verified, which closes the window even when a record is left behind.

How to test for it

  1. Enumerate hostnames for the target through certificate transparency logs, passive DNS, and the organisation's own published hostnames.
  2. Resolve each hostname and record what it points at: CNAME targets, and A or AAAA records that belong to known hosting ranges.
  3. For each third-party target, request the hostname and read the response. A provider error page saying the resource does not exist, a bucket name in an error body, or a default "no such app" page are strong signals that the backing resource is gone.
  4. Try to claim the resource on the provider with a fresh account, using the same name the DNS record expects. If the provider lets you create it and the hostname then serves your content, the takeover is confirmed.
  5. Keep the proof minimal and non-destructive: a static file with a unique marker is enough. Do not touch cookies, do not attempt to intercept traffic, and remove the claim afterwards.

Common false positives: a hostname that returns an error page but whose DNS record has already been removed; a provider that reserves deleted names so they cannot be re-registered; a wildcard DNS record that makes every subdomain resolve regardless of whether a specific record exists; and a hostname that is genuinely still in use but temporarily unhealthy. Confirm that the DNS record itself still exists and that you, not the provider's fallback, are answering for it.

How it is fixed

The standard fix is to delete the dangling DNS record, as this report recommends. Where the record must stay, recreate the backing resource on the provider so the endpoint is owned again, or move the record to a new endpoint you control. Longer term, add DNS records to the decommissioning checklist, monitor third-party endpoints for missing resources, and prefer providers that support domain verification so a name cannot be claimed by another account.

Hunting notes

This bug class hides in the seams between teams: records created for a test, a pilot, a campaign or a migration, then forgotten. Certificate transparency logs are the best starting point because they surface hostnames that may never appear in documentation. Passive DNS history helps show when a record changed or stopped resolving to a live resource. Pay attention to hostnames that point at CDN, storage and hosting providers, especially ones with a naming convention that includes the organisation's name.

Recon signals worth chasing: provider error pages, CNAMEs to services the organisation no longer appears to use, and hostnames that resolve but return nothing useful. To make a report land, show control of the hostname with a harmless marker file, explain clearly which DNS record is orphaned and what it points at, and state honestly what the hostname is used for. If nothing references it, say so, as this report does; a well-evidenced low-impact finding is still a valid one, and overstating impact is the fastest way to get it closed.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 7 min read.

What happened, in plain words

A website is found by its name, like a house is found by its address. That name is called a domain, and sc-cdn.net is one that belongs to Snapchat. A subdomain is a name placed in front of it, so fastly.sc-cdn.net is a subdomain of sc-cdn.net. A CDN (content delivery network) is a network of servers that hands out files quickly to users around the world.

To make a subdomain work, the owner writes a DNS record. DNS is the internet's address book: it maps a name to the place that actually answers for it. In this case the record for fastly.sc-cdn.net pointed at a test setup on Fastly, a CDN provider. When the test was finished, the Fastly service was cancelled, but the DNS record was left behind. The address book still pointed at a house that had been emptied out.

The researcher noticed this leftover record. Because Fastly lets customers create services, the researcher was able to create a Fastly service that answered for the same name. From that moment, the researcher's Fastly instance answered for the name instead of Snapchat's service. This is called a subdomain takeover: someone else takes control of a name that still belongs to the original owner.

Before reporting, the researcher checked that the name really was Snapchat's. The evidence was a certificate record on Censys, a public search engine for internet-wide data:

Text
https://censys.io/certificates/[redacted]

A certificate is the digital document a website presents to prove its identity, and Censys keeps a searchable list of them. Finding a certificate for the name is a way to tie it to the organisation.

The report is honest about how much this mattered. The researcher wrote that the risk "seems minimal at best", because the domain did not appear to be used anywhere on any Snapchat properties. In other words, the name was taken over, but nothing important seemed to depend on it.

To prove the takeover, the researcher gave one simple reproduction step: visit http://fastly.sc-cdn.net/takeover.html. Behind that visit is an ordinary web request, the message a browser sends to a server asking for a page:

Line by line:

  • GET /takeover.html HTTP/1.1 asks the server for the file takeover.html using version 1.1 of the web's request protocol. GET means "give me this".
  • Host: fastly.sc-cdn.net tells the server which name the browser is asking about. One server can answer for many names, so this line says which one is wanted.

Visiting that page was the researcher's reproduction step for the takeover. The recommended fix was equally simple: remove the DNS record.

The report was disclosed on 22 August 2016, was classified as a violation of secure design principles, and paid a bounty of 3,000 USD. No CVSS score is given.

In general, how this kind of bug works

A DNS record is a promise that a name leads to a particular provider. When the provider-side resource behind that promise is deleted but the record survives, the promise is broken: the name still resolves, but nothing legitimate answers for it. Many providers hand out endpoint names on a first-come, first-served basis, so a new account can recreate the same name and start answering requests for the orphaned hostname.

This is not limited to CDNs. It appears wherever a DNS record points at a hosted service that can be re-registered: object storage buckets, static site hosting, platform-as-a-service apps, marketing and form tools, and similar. The common thread is that the DNS record outlives the resource it references.

Defences are mostly operational: keep a list of every DNS record that points at a third party, tie record lifetime to resource lifetime, and remove records as part of decommissioning. Some providers offer domain-claim or verification mechanisms that stop a second party from claiming a name another account has verified, which closes the window even when a record is left behind.

How to test for it

  1. Collect hostnames for the target through certificate transparency logs (public lists of issued certificates), passive DNS, and the organisation's own published hostnames.
  2. Resolve each hostname and record what it points at: CNAME targets (a CNAME is a DNS record that says "this name is an alias for that name"), and A or AAAA records that belong to known hosting ranges.
  3. For each third-party target, request the hostname and read the response. A provider error page saying the resource does not exist, a bucket name in an error body, or a default "no such app" page are strong signals that the backing resource is gone.
  4. Try to claim the resource on the provider with a fresh account, using the same name the DNS record expects. If the provider lets you create it and the hostname then serves your content, the takeover is confirmed.
  5. Keep the proof minimal and non-destructive: a static file with a unique marker is enough. Do not touch cookies (small pieces of data a site stores in your browser), do not attempt to intercept traffic, and remove the claim afterwards.

Common false positives: a hostname that returns an error page but whose DNS record has already been removed; a provider that reserves deleted names so they cannot be re-registered; a wildcard DNS record that makes every subdomain resolve regardless of whether a specific record exists; and a hostname that is genuinely still in use but temporarily unhealthy. Confirm that the DNS record itself still exists and that you, not the provider's fallback, are answering for it.

How it is fixed

The standard fix is to delete the dangling DNS record, as this report recommends. Where the record must stay, recreate the backing resource on the provider so the endpoint is owned again, or move the record to a new endpoint you control. Longer term, add DNS records to the decommissioning checklist, monitor third-party endpoints for missing resources, and prefer providers that support domain verification so a name cannot be claimed by another account.

Hunting notes

This bug class hides in the seams between teams: records created for a test, a pilot, a campaign or a migration, then forgotten. Certificate transparency logs are the best starting point because they surface hostnames that may never appear in documentation. Passive DNS history helps show when a record changed or stopped resolving to a live resource. Pay attention to hostnames that point at CDN, storage and hosting providers, especially ones with a naming convention that includes the organisation's name.

Recon signals worth chasing: provider error pages, CNAMEs to services the organisation no longer appears to use, and hostnames that resolve but return nothing useful. To make a report land, show control of the hostname with a harmless marker file, explain clearly which DNS record is orphaned and what it points at, and state honestly what the hostname is used for. If nothing references it, say so, as this report does; a well-evidenced low-impact finding is still a valid one, and overstating impact is the fastest way to get it closed.

Glossary

  • Domain: the name that identifies a website or service on the internet, such as sc-cdn.net.
  • Subdomain: a name placed in front of a domain, such as fastly.sc-cdn.net, used to separate services.
  • DNS: the internet's address book, which maps names to the servers that answer for them.
  • DNS record: a single entry in that address book, saying where a name should lead.
  • CNAME: a DNS record that makes one name an alias for another name.
  • A / AAAA record: a DNS record that maps a name directly to an IP address (IPv4 for A, IPv6 for AAAA).
  • CDN: content delivery network, a set of servers that delivers files quickly to users.
  • Fastly: a CDN provider whose services customers can create and cancel.
  • Subdomain takeover: taking control of a name whose DNS record still points at a resource nobody owns any more.
  • Dangling DNS record: a record left pointing at a service that has been cancelled or deleted.
  • Request: the message a browser sends to a server asking for a page or file.
  • Host header: the line in a request that says which name the browser is asking about.
  • HTTP: the protocol browsers and servers use to exchange requests and responses.
  • Certificate: a digital document a site presents to prove its identity.
  • Censys: a public search engine for internet-wide data such as certificates.
  • Certificate transparency logs: public lists of issued certificates, useful for finding hostnames.
  • Passive DNS: historical records of what names resolved to, collected by third parties.
  • Cookie: a small piece of data a site stores in your browser.
  • Wildcard DNS record: a record that makes every subdomain resolve, whether or not a specific record exists.
  • False positive: a finding that looks like a bug but is not one.
  • CVSS: a scoring system for rating the severity of a vulnerability.
  • Bounty: a payment made to a researcher for reporting a valid security issue.

More by ebrietas

View all

3 more disclosed reports, best first.

More from Snapchat

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.