Skip to content
Subdomain takeover Disclosed report Beginner

[ addons-preview-cdn.mozilla.net ] A subdomain takeover is available via unregistered domain in Fastly

The domain addons-preview-cdn.mozilla.net had a CNAME pointing to a Fastly service that did not claim the domain, so an attacker could register it on Fastly and serve arbitrary content under the Mozilla subdomain. This could enable phishing, cookie theft, and other impersonation attacks.

haveaniceday Follow

Originally disclosed on HackerOne

Bounty$500 Medium View original
  • Triaged in 2 days
  • Fixed in 3 days
  • Paid in 5 days
  • Disclosed after 3 months

Summary

The domain addons-preview-cdn.mozilla.net will CNAME resolve to addons.allizom.org, which resolves within Fastly's service. The domain addons-preview-cdn.mozilla.net was not registered within Fastly, which resulted in an error that says "Fastly error: unknown domain"

After registering this domain on Fastly, I was able to serve custom content on addons-preview-cdn.mozilla.net.

Proof-of-Concept

  1. Go to http://addons-preview-cdn.mozilla.net/haveanicetakeover-poc.html

Supporting Material

Impact

Summary:

A subdomain takeover can be a serious issue, in which an attacker can load their own content while impersonating a targeted victim.

This impersonation can be abused for numerous impacts, including, but not limited to:

  • Cookie Stealing
  • Phishing Campaigns (i.e. Stealing Credentials)
  • Cross-Site Scripting (XSS)
  • Authentication Bypass
  • Malware Distribution

More information on the impact of subdomain takeovers can be found at: https://0xpatrik.com/subdomain-takeover-impact/

Fix

In order to fix this bug, one only needs to remove the CNAME DNS record for addons-preview-cdn.mozilla.net, so that it not longer points to addons.allizom.org Alternatively, the domain addons-preview-cdn.mozilla.net could be claimed within Fastly, in order to properly direct this domain to the correct endpoint.

If you have any questions about this report, please let me know.

Thank you,

Have a Nice Day!

Attachments

feeds.support.dyson.com-takeover.png
feeds.support.dyson.com-takeover.png From the original on HackerOne

The original report as published on HackerOne, by haveaniceday. 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. 3 min read.

Context

The report concerns the hostname addons-preview-cdn.mozilla.net. The report describes that hostname as a CNAME pointing to addons.allizom.org, a name that resolves inside Fastly's CDN service. In Fastly's model, a customer claims a domain by registering it against a service; until that happens, requests for the hostname are answered with an error page rather than the customer's content.

The bug is a subdomain takeover: the DNS record still delegated the name to a third-party provider, but no one at the provider had claimed it, so anyone with a Fastly account could register the name and serve their own content under Mozilla's domain.

Setup

The report does not describe any special tooling or versions. The only precondition is the one that defines the bug: the CNAME from addons-preview-cdn.mozilla.net to addons.allizom.org exists, and addons-preview-cdn.mozilla.net is not registered within Fastly.

Finding it

addons-preview-cdn.mozilla.net CNAME-resolves to addons.allizom.org, which resolves within Fastly's service. Requesting the hostname produced an error saying "Fastly error: unknown domain". That message is the signal: Fastly is authoritative for the name but has no service configured for it, so the name is unclaimed at the provider even though Mozilla's DNS still points at it.

Exploitation

Step 1: Confirm the dangling CNAME

addons-preview-cdn.mozilla.net CNAME-resolves to addons.allizom.org, and the unregistered domain produced a "Fastly error: unknown domain" error.

Step 2: Register the domain on Fastly

The researcher registered addons-preview-cdn.mozilla.net on Fastly. After registering this domain on Fastly, the researcher was able to serve custom content on addons-preview-cdn.mozilla.net.

Step 3: Serve custom content

With the domain registered, the researcher served custom content on addons-preview-cdn.mozilla.net. The proof of concept is a single URL:

HTTP
http://addons-preview-cdn.mozilla.net/haveanicetakeover-poc.html

The page displayed the researcher's custom content. The report includes a screenshot of the URL displaying the custom content:

feeds.support.dyson.com-takeover.png
feeds.support.dyson.com-takeover.png From the original on HackerOne

Root cause

The DNS record for addons-preview-cdn.mozilla.net still pointed to addons.allizom.org, but the corresponding domain was never registered within Fastly. Fastly therefore had no service bound to the hostname and answered with "unknown domain". The domain was not registered within Fastly, so the researcher could register it and serve custom content. Mozilla's DNS record still pointed to addons.allizom.org, but the domain was not registered within Fastly.

Impact

A subdomain takeover lets an attacker load their own content while impersonating the targeted victim. The report lists the impacts this impersonation can be abused for, including, but not limited to:

  • Cookie Stealing
  • Phishing Campaigns (i.e. Stealing Credentials)
  • Cross-Site Scripting (XSS)
  • Authentication Bypass
  • Malware Distribution

These are the general consequences of controlling a trusted hostname; the report does not demonstrate any of them against Mozilla users, only that custom content could be served from the domain.

Fix

The report gives two options. The first is to remove the CNAME DNS record for addons-preview-cdn.mozilla.net so that it no longer points to addons.allizom.org. The second is to claim addons-preview-cdn.mozilla.net within Fastly so that the domain is properly directed to the correct endpoint. The report does not say which option was applied.

  • Other hostnames in the same zone that CNAME to third-party CDN or hosting providers: a positive result is a provider error page such as "unknown domain" or "no such app" instead of the expected content.
  • Names pointing at allizom.org or similar staging domains that resolve inside Fastly: a positive result is the same "Fastly error: unknown domain" response.
  • Any hostname whose CNAME target is a provider where domain registration is self-service: a positive result is that you can register the name on your own account and see your content served from the original hostname.

This class of bug hides in DNS records that were left behind when a service was moved or decommissioned. During recon, collect CNAMEs for every in-scope hostname and look for targets at CDN and hosting providers, then request each hostname and watch for provider-specific "unknown domain", "no such app" or unclaimed-site pages. The researcher showed impact with a single page served from the taken-over hostname, which is enough to prove control; the report's impact section then explains what that control could be used for.

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. 8 min read.

What happened, in plain words

The report concerns a hostname called addons-preview-cdn.mozilla.net. A hostname is just a name on the internet, like a street address, that a browser looks up to find the computer that holds the content.

Mozilla's DNS pointed the name at addons.allizom.org. Instead, it told the internet: "if you want addons-preview-cdn.mozilla.net, go and ask addons.allizom.org." That kind of forwarding note in the internet's address book is called a CNAME record. The name addons.allizom.org lives inside Fastly, a company that delivers website content quickly from servers all over the world (a CDN, or content delivery network).

Here is the problem. Fastly only serves a name if one of its customers has registered that name with Fastly first. Mozilla's address book still pointed at Fastly, but nobody had registered addons-preview-cdn.mozilla.net inside Fastly. So when you visited the name, Fastly replied with an error page saying "Fastly error: unknown domain".

The researcher registered addons-preview-cdn.mozilla.net on Fastly and was then able to serve custom content on it. This is called a subdomain takeover: a piece of a company's domain name falls under someone else's control because a forwarding record was left pointing at a service nobody had claimed.

The setup

The report does not mention any special tools or software versions. The only thing needed for the bug to exist is the combination of two facts: The only thing needed for the bug to exist is the combination of two facts:

  1. The CNAME from addons-preview-cdn.mozilla.net to addons.allizom.org exists.
  2. addons-preview-cdn.mozilla.net is not registered within Fastly.

Think of it like a mail forwarding order at the post office. Mozilla's order says "all mail for this address goes to Fastly's building". But at Fastly's building there is no mailbox with that name on it. Anyone who walks in and puts their own name on the empty mailbox starts receiving Mozilla's mail.

Finding it

The chain of names is as follows:

  1. Look up addons-preview-cdn.mozilla.net. The answer is a CNAME pointing to addons.allizom.org.
  2. Look up addons.allizom.org. The answer points into Fastly's service.
  3. Visit addons-preview-cdn.mozilla.net in a browser. Instead of Mozilla content, the page says "Fastly error: unknown domain".

That error message is the clue. It means Fastly is the company responsible for answering requests for this name, but no customer has set up a service for it. In other words, the name is unclaimed at the provider, even though Mozilla's own address book still sends visitors there. A name in that state is often called a dangling record: the forwarding note exists, but the destination is empty.

Exploitation

Step 1: Confirm the dangling CNAME

Resolving addons-preview-cdn.mozilla.net shows the CNAME to addons.allizom.org, and a request to the hostname returns the "Fastly error: unknown domain" page. addons-preview-cdn.mozilla.net CNAME-resolves to addons.allizom.org, and the unregistered domain produced a "Fastly error: unknown domain" error.

Step 2: Register the domain on Fastly

The researcher registered addons-preview-cdn.mozilla.net on Fastly. After registering this domain on Fastly, the researcher was able to serve custom content on addons-preview-cdn.mozilla.net.

Step 3: Serve custom content

With the domain registered, the researcher served custom content on addons-preview-cdn.mozilla.net. The proof of concept is a single URL:

HTTP
http://addons-preview-cdn.mozilla.net/haveanicetakeover-poc.html

Line by line, this is one web address:

  • http:// is the protocol, the set of rules the browser uses to fetch the page.
  • addons-preview-cdn.mozilla.net is Mozilla's hostname, the one that was taken over.
  • /haveanicetakeover-poc.html is the path of a file on that hostname. The researcher chose this file name; it is a page they created themselves.

The page displayed the researcher's custom content. The report includes a screenshot of the URL displaying the custom content:

feeds.support.dyson.com-takeover.png
feeds.support.dyson.com-takeover.png From the original on HackerOne

The screenshot shows the URL displaying the custom content.

Root cause

The DNS record for addons-preview-cdn.mozilla.net still pointed to addons.allizom.org, but the corresponding domain was never registered within Fastly. Fastly therefore had no service bound to the hostname and answered with "unknown domain". The domain was not registered within Fastly, so the researcher could register it and serve custom content. Mozilla's DNS record still pointed to addons.allizom.org, but the domain was not registered within Fastly.

A useful comparison is a key left in a locker. The locker belongs to the building, the key is still in the door, and the building's staff assume the locker is in use. Anyone who turns the key owns whatever is inside.

Impact

A subdomain takeover lets an attacker load their own content while impersonating the targeted victim. The report lists the impacts this impersonation can be abused for, including, but not limited to:

  • Cookie Stealing
  • Phishing Campaigns (i.e. Stealing Credentials)
  • Cross-Site Scripting (XSS)
  • Authentication Bypass
  • Malware Distribution

A few of these terms deserve a short explanation for anyone new to security:

  • A cookie is a small piece of data a website stores in your browser so it can recognise you on the next request, for example to keep you logged in. If an attacker controls a hostname that belongs to the same site, they may be able to read or receive cookies meant for that site.
  • Phishing is a fake page that looks like a real login screen and captures whatever you type into it.
  • Cross-Site Scripting, or XSS, is when an attacker gets their own code to run inside a page that the victim trusts.
  • Authentication Bypass means getting past a login check without the correct credentials.
  • Malware Distribution means using the trusted address to hand out harmful software, because people are more willing to download from a name they recognise.

These are the general consequences of controlling a trusted hostname; the report does not demonstrate any of them against Mozilla users, only that custom content could be served from the domain.

Fix

The report gives two options. The first is to remove the CNAME DNS record for addons-preview-cdn.mozilla.net so that it no longer points to addons.allizom.org. In everyday terms, take the forwarding note out of the address book so nobody is sent to the empty mailbox any more.

The second is to claim addons-preview-cdn.mozilla.net within Fastly so that the domain is properly directed to the correct endpoint. In everyday terms, put Mozilla's own name on the empty mailbox before a stranger does.

The report does not say which option was applied.

If you want to look for the same kind of mistake elsewhere, the report suggests three angles:

  • Other hostnames in the same zone that CNAME to third-party CDN or hosting providers: a positive result is a provider error page such as "unknown domain" or "no such app" instead of the expected content.
  • Names pointing at allizom.org or similar staging domains that resolve inside Fastly: a positive result is the same "Fastly error: unknown domain" response.
  • Any hostname whose CNAME target is a provider where domain registration is self-service: a positive result is that you can register the name on your own account and see your content served from the original hostname.

This class of bug hides in DNS records that were left behind when a service was moved or decommissioned. During recon, collect CNAMEs for every in-scope hostname and look for targets at CDN and hosting providers, then request each hostname and watch for provider-specific "unknown domain", "no such app" or unclaimed-site pages. The researcher showed impact with a single page served from the taken-over hostname, which is enough to prove control; the report's impact section then explains what that control could be used for.

Glossary

  • Hostname: a name on the internet, such as addons-preview-cdn.mozilla.net, that a browser looks up to find a server.
  • DNS: the internet's address book, which maps names to the servers that answer for them.
  • CNAME record: a DNS entry that says "for this name, go and ask this other name instead".
  • Subdomain: a name that sits under a larger domain, for example addons-preview-cdn.mozilla.net under mozilla.net.
  • Subdomain takeover: a bug where a company's subdomain is left pointing at a third-party service that nobody has claimed, so anyone can claim it and serve their own content under the company's name.
  • Dangling record: a DNS record that still points somewhere, but the destination is no longer set up or claimed.
  • CDN (content delivery network): a company that stores and serves website content from many servers around the world so pages load quickly.
  • Fastly: the CDN provider used in this report, where customers register the domains they want served.
  • Registering a domain (at a provider): telling the provider that you want to serve content for a particular hostname on your account.
  • "Fastly error: unknown domain": the error page Fastly returns when it is asked for a hostname that no customer has registered.
  • Proof of concept (PoC): a small demonstration that proves a bug is real, here a single page served from the taken-over hostname.
  • Cookie: a small piece of data a site stores in your browser to recognise you, often used to keep you logged in.
  • Phishing: a fake page or message that imitates a trusted site to steal information such as passwords.
  • Cross-Site Scripting (XSS): a bug where an attacker's code runs inside a page the victim trusts.
  • Authentication Bypass: getting past a login or identity check without valid credentials.
  • Malware Distribution: using a trusted address to deliver harmful software to visitors.
  • Recon: the information-gathering phase of security testing, where you collect names, addresses and other details about a target before probing it.
  • Staging domain: a name used for testing or pre-release versions of a service, often pointing at the same infrastructure as the live site.

More from Mozilla

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.