Skip to content
Subdomain takeover Disclosed report Beginner

Sub Domain Takeover

A Gratipay subdomain pointed to Heroku but had no Heroku app associated with it, allowing an attacker to claim the subdomain by creating a Heroku app and adding the domain. The attacker could then serve their own content on that subdomain.

b3nac Follow

Originally disclosed on HackerOne

Informational View original
  • Fixed in 4 days
  • Disclosed after 6 months

One of Gratipay's sub domains points to Heroku with no app created.

Description

Gratipay's sub domain http://www.gratipay.com.herokudns.com/ points to Heroku but is not in use.

Steps To Reproduce

###Details

heroku domains:add www.gratipay.com.herokudns.com

After verifying my Heroku account this was easy to point the sub domain to my application.

  • Uploaded my application with text "B3nac sub domain takeover POC." and refreshed the domain to find it pointed to my application successfully.

Fix

If the domain is not in use, then it is recommended to point the dns entry away from the third party program.

Supporting Material/References:

  • I've attached the uploaded takeover python application/website screenshot.

Attachments

POC.png
POC.png From the original on HackerOne
HerokuCLI.png
HerokuCLI.png

The original report as published on HackerOne, by b3nac. 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 pointing to a Heroku hostname that no longer had an associated app, allowing anyone to claim it.

Impact

An attacker could host their own content on a Gratipay subdomain.

What the attacker needed

A Heroku account; knowledge of the dangling subdomain

The fix

The DNS entry should be removed or pointed away from the third-party service if the subdomain is not in use.

How it was found

  1. Install and create a Heroku application.
  2. Add the target subdomain to the Heroku app using the Heroku CLI.
  3. Upload a proof-of-concept application to the Heroku app.
  4. Refresh the subdomain to confirm it now serves the attacker's content.

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.

When a website uses a third-party service like Heroku, it often points a subdomain to that service using a DNS record. If the service no longer has an app tied to that subdomain, anyone can create a new app on the service and claim the subdomain, showing their own content under the trusted domain name. This is called a subdomain takeover.

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 b3nac

View all

6 more disclosed reports, best first.

More from Gratipay

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.