Skip to content
Subdomain takeover Write-up Beginner

Subdomain Takeover using readthedocs

A subdomain pointing to Read the Docs but not claimed by any project returns an error page, allowing an attacker to register a new Read the Docs project and claim that domain. The attacker could then serve their own content on the victim's subdomain.

Shashank Follow

Published on blog.shashank.co

The original lives on blog.shashank.co

We do not hold its text, 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 record for the subdomain still points to Read the Docs after the corresponding project was deleted or never claimed, and Read the Docs allows any user to add an arbitrary custom domain without verifying ownership.

What the attacker needed

A subdomain pointing to Read the Docs; the subdomain is not claimed by any project; a free Read the Docs account

How it was found

  1. Sign up at Read the Docs and go to admin settings.
  2. Add a repository (the template repository or a fork).
  3. Set the repository URL in the admin settings.
  4. Go to Domains in admin settings and add the target domain.

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.

When a website uses a service like Read the Docs to host documentation, it often points a subdomain (like docs.example.com) to that service. If the owner later removes the project but leaves the DNS record pointing to Read the Docs, anyone can sign up and claim that subdomain. This is called a subdomain takeover because the attacker takes control of the subdomain and can show their own content.

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.

More by Shashank

View all

6 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Subdomain takeover

The lesson behind this report.

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.