How I Took Over a Vercel Subdomain
A subdomain's DNS record still pointed to Vercel after the Vercel project was removed, leaving a dangling CNAME. An attacker could claim that subdomain by adding it to their own Vercel project, serving content under the trusted domain.
medium.com
Published on medium.com
I’m Joel here to share a critical yet often overlooked security issue. This time, we’re exploring a niche yet critical security misconfiguration – Vercel Subdomain Takeover.
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
The DNS record for the subdomain was left pointing at Vercel after the Vercel project was deleted, and Vercel allowed the unclaimed name to be added to another account without extra verification.
Impact
An attacker could host unauthorised content on the trusted subdomain, which could be used for phishing or other malicious activity.
What the attacker needed
Dangling DNS record pointing to Vercel; a free Vercel account
The fix
Domain owners should remove or update DNS records when retiring a service, and use Vercel's TXT-based domain verification to block unauthorised claims.
How it was found
- Request the subdomain and look for a Vercel not-found response.
- Check DNS and confirm a CNAME to Vercel's DNS host.
- Sign up for Vercel and deploy a simple static site.
- Add the vulnerable subdomain to the new Vercel project.
- Visit the subdomain and see 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 prefix like 'shop' in shop.example.com. If it points to an outside service that no longer exists, anyone who signs up for that service can claim the name and put their own content there. Visitors see the trusted domain, so they may trust the attacker's page.
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.