Subdomain Takeover: My $450 Win & How You Can Do It Too
A subdomain pointed to a deleted Vercel project via a still-active CNAME record, allowing an attacker to claim the project name and host arbitrary content under the victim's domain. The attacker could then use the subdomain for phishing or impersonation.
Published on ehteshamulhaq198.medium.com
Free Article Link: Click for free!
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
Root cause
Likely the DNS CNAME record for the subdomain was not removed after the third-party Vercel project was deleted, leaving a dangling pointer that anyone could claim.
Impact
An attacker could host arbitrary content, such as a phishing login page, under the victim's domain, enabling impersonation and other malicious activities.
What the attacker needed
Subdomain with dangling CNAME to third-party; third-party service allows claiming the name; no account needed on victim side
The fix
The issue was fixed after being reported to the security team.
How it was found
- Find subdomains of the target using subdomain enumeration tools.
- Resolve the subdomains and filter for CNAME records pointing to third-party services like Vercel, Heroku, GitHub, S3, or WordPress.
- Scan the subdomains with Nuclei takeover templates to detect unclaimed services.
- Manually verify each candidate by visiting the subdomain and checking for error messages indicating the service is unclaimed, and by visiting the CNAME target directly to confirm it is dead.
- Claim the unclaimed service (in this case, the Vercel project name) and confirm that the victim subdomain now points to the attacker's content.
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 part of a website address, like blog.example.com. Sometimes a company points a subdomain to an external service (like Vercel) but later deletes the service without removing the DNS record that says 'this subdomain belongs to that service'. An attacker can then sign up for that service using the same name and take control of the subdomain, letting them show their own content on the company's domain.
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.