Skip to content
Subdomain takeover Disclosed report Intermediate

Subdomain takeover due to non registered TLD [ ██████████.█████.██████.com ]

A DNS CNAME record for a subdomain pointed to a domain under a top-level domain that was not registered. An attacker could register that TLD and domain to take over the subdomain and serve malicious content.

0xprial Follow

Originally disclosed on HackerOne

  • Fixed in 6 days
  • Paid in 5 days
  • Disclosed after 12 days

Summary:

I was looking at recent disclosed report #1297689 and I was thinking to take a look for the same issue on this asset as I love to test for subdomain takeover vulnerabilities.

While testing I noticed a DNS entry for ███████.████.██████████.com is CNAME ████.███████████ which's TLD is not registered yet and also not reserved for using Internal DNS Domain Name . As a result, an attacker can register for the ███ TLD to create and takeover ███████.████████.█████.com subdomain.

Steps To Re█████████uce:

  • Check CNAME record of █████.█████.██████.com subdomain and you will see a record like below
0xPrial@n00b ~ % dig ████.████.████.com

; <<>> DiG 9.10.6 <<>> ██████.█████.████.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 27323
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;██████.███████.████.com.	IN	A

;; ANSWER SECTION:
██████████.███████.██████.com. 300 IN	CNAME	██████████.██████████████.

;; AUTHORITY SECTION:
.			10800	IN	SOA	a.root-servers.net. nstld.verisign-grs.com. 2021081901 1800 900 604800 86400

;; Query time: 216 msec
;; SERVER: 10.0.0.1#53(10.0.0.1)
;; WHEN: Fri Aug 20 02:18:14 +06 2021
;; MSG SIZE  rcvd: 162

  • Take a look at CNAME value what is ████.████████████. domain which TLD is ████ what is not registered yet. So it's available to register and buy the domain.
  • You can check already registered TLD's from this list: http://data.iana.org/TLD/tlds-alpha-by-domain.txt

Supporting Material/References:

And Internal used reserved domains TLD are

  • .test
  • .example
  • .invalid
  • .localhost

Impact

An attacker can register for ████████ TLD to take over the target subdomain by buying ██████████ domain and create █████.███████ subdomain to serve content on █████.█████████.█████████.com subdomain, which can lead to malicious attacks against users. Users will see this as a valid domain of Affirm and they may share their sensitive information with an attacker.

Reference documents:

RECOMMENDED FIX It looks like it was a human error while creating that subdomain record. If it was an error update that DNS record to a correct one or delete it if it's not in need.

Regards Prial

The original report as published on HackerOne, by 0xprial. 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 a human error created a CNAME record pointing to a domain under an unregistered top-level domain.

Impact

An attacker could take over the subdomain and serve malicious content, potentially tricking users into sharing sensitive information.

What the attacker needed

Ability to register the unregistered TLD; Knowledge of the vulnerable subdomain

The fix

The DNS record should be updated to a correct one or deleted if not needed.

How it was found

  1. Check the CNAME record of the subdomain using a DNS query tool.
  2. Observe that the CNAME points to a domain whose top-level domain is not registered.
  3. Verify that the top-level domain is not in the list of registered TLDs.
  4. Register the unregistered top-level domain and the target domain to take over the subdomain.

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.

A subdomain takeover happens when a DNS record points to a service or domain that no longer exists or is not controlled by the organisation. If an attacker can claim that destination, they can control what appears on the subdomain. Here, the destination used a top-level domain (the part after the last dot, like .com) that was not registered, so anyone could register it and take over the subdomain.

What is Subdomain takeover?

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.

More by 0xprial

View all

12 more disclosed reports, best first.

More from Affirm

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.