S3 bucket takeover [learn2.khanacademy.org]
A subdomain pointed to Amazon S3 but the corresponding bucket was unclaimed, allowing anyone to register it and serve arbitrary content. An attacker could host phishing pages or steal cookies under the trusted domain.
- Fixed in 5 days
- Disclosed after 42 days
The subdomain learn2.khanacademy.org was pointed to Amazon S3, but no bucket with that name was registered [learn2.khanacademy.org]. This meant that anyone could sign up for Amazon S3, claim the bucket as their own and then serve content.
Steps to reproduce
Check the following url: http://learn2.khanacademy.org
Also
> curl -k http://learn2.khanacademy.org/
<!doctype html>
<html>
<head>
<title>S3 takeover POC</title>
</head>
<body>
<p>This is S3 takeover POC </p>
</body>
</html>
Impact
It's extremely vulnerable to attacks as a malicious user could create any web page with any content and host it on the ford.com domain. This would allow them to post malicious content which would be mistaken for a valid site.
They could perform several attacks like:
- Cookie Stealing
- Phishing campaigns.
- Bypass Content-Security Policies and CORS.
Recommendations for fix
- Remove the affected DNS record
Supporting Material/References:
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 a dangling DNS record pointing to an S3 bucket that was never registered, allowing anyone to claim it.
Impact
A malicious user could host arbitrary content on the trusted domain, enabling cookie stealing, phishing campaigns, and bypassing of Content-Security Policies and CORS.
What the attacker needed
None
The fix
The affected DNS record should be removed.
How it was found
- Visit the subdomain URL.
- Observe that the subdomain serves content from an S3 bucket that was unclaimed and could be taken over.
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.
A subdomain is a prefix like 'learn2' added to a main domain. The report says this subdomain was set up to use Amazon S3 storage, but nobody had actually created the storage space (bucket) with that name. Because anyone can create a bucket with an unused name, an attacker could take it over and put their own web pages there, making them look like they belong to the real site.
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.