Route53 Subdomain Takeover on test-cncf-aws.canary.k8s.io
A subdomain of the Kubernetes canary domain was still delegated to AWS Route53 nameservers even though the hosted zone had been deleted, so anyone could claim that zone. The attacker could then create DNS records under the host and serve arbitrary content on the organisation's domain.
Originally disclosed on HackerOne
- Triaged in under an hour
- Disclosed after 11 months
Summary:
I discovered that it was possible to takeover test-cncf-aws.canary.k8s.io by assigning a zone to that name with one of the following nameservers in Route53:
test-cncf-aws.canary.k8s.io. 3600 IN NS ns-265.awsdns-33.com.
test-cncf-aws.canary.k8s.io. 3600 IN NS ns-687.awsdns-21.net.
test-cncf-aws.canary.k8s.io. 3600 IN NS ns-1458.awsdns-54.org.
test-cncf-aws.canary.k8s.io. 3600 IN NS ns-1825.awsdns-36.co.uk.
Once the zone was claimed, I was able to create DNS records under this host. Consider the following record:
poc.test-cncf-aws.canary.k8s.io
##Steps To Reproduce:
- See above domain
##Remediation Instructions Remove the NS record delegation NS privs on a subdomain before you delete the zone
Impact
With this vulnerability, an attacker can host arbitrary content under your domain. This can allow an attacker to host brand-damaging materials, steal sensitive * scoped session cookies, and even escalate other vulnerabilities.
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 the NS delegation for the subdomain was left in the parent zone after the Route53 hosted zone was deleted, so the nameservers became claimable by anyone.
Impact
An attacker could host arbitrary content under the organisation's domain, which could be used for brand damage, theft of scoped session cookies, or to escalate other vulnerabilities.
What the attacker needed
Control of a Route53 account; dangling NS delegation exists
How it was found
- Find the subdomain that is delegated to Route53 nameservers.
- Create a new Route53 hosted zone for that name using the same nameservers.
- Add DNS records under the claimed host to prove control.
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.
Every domain name is looked up through nameservers, which are servers that say where a site lives. If a company stops using a nameserver but leaves the pointer to it in place, someone else can register that same nameserver space and answer lookups themselves. Here the leftover pointer let a stranger control a small part of the company's domain and put their own content there.
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.