Skip to content
Subdomain takeover Disclosed report Beginner

Subdomain Takeover at https://new.rubyonrails.org/

The subdomain new.rubyonrails.org had a DNS record pointing to an unclaimed GitHub Pages site, so anyone could register that page and serve content under the trusted domain. The reporter claimed it and showed a simple page as proof, noting that cookies scoped to the root domain could be exposed and that the domain could host phishing or malicious content.

nagli Follow

Originally disclosed on HackerOne

  • Fixed in 47 days
  • Disclosed after 3 months

Disclaimer

I know it's OOS but the issue is pretty serious because of the attractive domain name "new.rubyonrails.org" basically anyone could have put malware there.

Summary

Hi!

I discovered that new.rubyonrails.org was pointing to an unclaimed Github Page, making it vulnerable to subdomain takeover. I've managed to claim it in my Github-account and added a simple html file as POC:

Screen_Shot_2021-12-16_at_23.12.09.png
Screen_Shot_2021-12-16_at_23.12.09.png From the original on HackerOne

https://new.rubyonrails.org

Mitigation

  • Remove the DNS record

Best regards, nagli

Impact

Subdomain takeovers can be used for

  • Cookies set to the root domain will be shared with this subdomain and can be obtained
  • Stored XSS (arbitrary javascript code can be executed in a users browser)
  • Phishing
  • Hosting malicious content

The original report as published on HackerOne, by nagli. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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 left pointing at a GitHub Pages site that was no longer claimed by the organisation.

Impact

An attacker could serve arbitrary content on the trusted subdomain, potentially obtaining cookies set for the root domain, running script in visitors' browsers, phishing, or hosting malicious files.

What the attacker needed

DNS record points to unclaimed GitHub Pages; attacker has a GitHub account

The fix

The DNS record pointing at the unclaimed GitHub Pages site should be removed.

How it was found

  1. Notice that the subdomain resolves to an unclaimed GitHub Pages site
  2. Claim that GitHub Pages site from a personal account
  3. Upload a simple HTML file to demonstrate control of the subdomain

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 name like shop.example.com that sits under a main domain. If its DNS record points to a service (here, GitHub Pages) that nobody has actually claimed, an outsider can sign up for that same service and take control of what the subdomain shows. Visitors would then see attacker content on a name they trust.

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 nagli

View all

33 more disclosed reports, best first.

More from Ruby on Rails

View all

The newest disclosed reports for this program.

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.