From CNAME to Cash: Hijacking Misconfigured DNS Records for Maximum Impact
A dangling CNAME record for a subdomain pointed to an unused cloud service, allowing an attacker to claim that subdomain. The attacker then used the trusted subdomain to capture an OAuth session token and access admin-level GraphQL data, including internal keys and user information.
infosecwriteups.com
Published on infosecwriteups.com
Free link ๐
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 organisation left a DNS CNAME record pointing to a cloud service that was no longer in use, and did not remove it when decommissioning the service.
Impact
The attacker could capture a valid session token and access admin-level GraphQL data, including internal API keys, database credentials, and sensitive user data.
What the attacker needed
Dangling CNAME record; cloud service available to claim; OAuth/CORS trust on subdomain
The fix
The security team removed the misconfigured CNAME and locked down scopes, and the report was labelled Critical.
How it was found
- Enumerate subdomains and identify a dangling CNAME record.
- Create a matching cloud resource to claim the subdomain.
- Exploit OAuth/CORS trust to capture a session token.
- Use the token to query GraphQL admin endpoints and retrieve sensitive data.
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 CNAME record is like a forwarding address in the internet's phonebook (DNS). If it points to a service that no longer exists, someone else can claim that service and effectively take over the subdomain. Here, the attacker did that and then used the trusted subdomain to steal a login token and access sensitive data.
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.