Skip to content
Subdomain takeover Write-up Beginner

Subdomain Takeover

A subdomain's DNS record still pointed to a SaaS provider after the tenant was deleted, leaving the slot unclaimed. An attacker who registered that slot could serve content under the company's trusted domain.

medium.com

Published on medium.com

Subdomain Takeover occurs when a subdomain’s DNS record points to an external service that no longer claims that slot. The subdomain is left dangling — pointing at nothing — and anyone who registers the unclaimed slot on the provider inherits full control over the subdomain.

PewPew, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Impact

An attacker could host phishing pages under a legitimate trusted domain, steal cookies scoped to the parent domain, and chain XSS against sibling subdomains, with no logs or alerts on the company side.

What the attacker needed

Dangling CNAME to a SaaS provider; provider releases the tenant slug; attacker can register the slug

The fix

The dangling CNAME should be removed from DNS if the SaaS integration is inactive, and automated dangling CNAME audits should run weekly.

How it was found

  1. The company created a CNAME record from a subdomain to a SaaS provider.
  2. The SaaS contract ended and the tenant was deleted, but the DNS record remained.
  3. The provider released the slug, which resolved to [redacted] as a fingerprint.
  4. The attacker registered the unclaimed slug, so their IP resolved under the company's 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 write-up has not been written yet. The Original tab links to the source.

A subdomain is a smaller address under a main domain, like shop.example.com. A DNS record is the internet's directory entry that tells browsers where that address should go. Here the directory entry still pointed at a service the company had stopped paying for, so anyone could claim that service slot 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.

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.