Skip to content
Subdomain takeover Disclosed report Beginner

Subdomain Takeover - https://competition.shopify.com/

A Shopify subdomain had a dangling CNAME record pointing to an unclaimed Heroku service, allowing an attacker to claim the subdomain. The attacker could then host malicious content, steal cookies, phish users, or deface the site.

llt4l Follow

Originally disclosed on HackerOne

Medium 5.3 View original
  • Triaged in 10 hours
  • Fixed in 4 days
  • Paid in 10 hours
  • Disclosed after 5 days

Summary by the program

@llt4l discovered a dangling CNAME pointed to Heroku which allowed them to claim competition.shopify.com. We removed the DNS entry immediately and took the extra time to review and clean up some other records. As a result, we awarded an extra $250 on top of the typical $500 bounty.

The report

Dear Shopify Security Team,

The Shopify.com subdomain competition.shopify.com was vulnerable to a subdomain takeover as it was pointing to an unclaimed Heroku service through the CNAME competition.shopify.com.herokudns.com, while the custom domain 'competition.shopify.com' was unclaimed in Heroku.

To prevent an attacker from claiming the domain and using it for malicious purposes, and also as a proof of concept, I have claimed the domain in Heroku and uploaded a proof of concept, which you can view here: https://competition.shopify.com/329a01fddb5a552265170b02c579c85f.html (I've also redirected visitors of the index page to https://shopify.com)

To fix the issue, there are two possible solutions. If you would like to re-start using Heroku with this domain, I can remove the custom domain from my Heroku app. Otherwise you may choose to delete the entry from your DNS servers, which will also fix the problem.

Impact

I don't think I need to go into the security implications of a malicious attacker hijacking the domain, but here are a few possible attacks that could be performed if a malicious attacker were to hijack the domain:

  • The ability for an attacker to execute JavaScript to steal user cookies and/or using the site as an endpoint for browser exploitation.
  • Using the subdomain as a fool-proof phishing site (stealing Shopify customer/employee credentials). SSL has also been enabled, giving end users more trust of the site.
  • Defacement of the website, or deployment of a fake site, such as a fake Shopify competition that harvests customer credit card details.
  • Spreading of malware, or use of the domain as a C2 server.

I look forward to hearing back from your team.

Regards, t4

Attachments

competition.shopify.com.png
competition.shopify.com.png From the original on HackerOne

The original report as published on HackerOne, by llt4l. 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 (CNAME) pointing to a Heroku service that was no longer claimed by the organisation.

Impact

An attacker could execute JavaScript to steal cookies, use the subdomain for phishing, deface the site, or spread malware; SSL was enabled, making phishing more convincing.

What the attacker needed

Dangling CNAME to unclaimed Heroku service; attacker can claim the Heroku custom domain

The fix

The DNS entry was removed immediately, and other records were reviewed and cleaned up.

How it was found

  1. The researcher noticed that competition.shopify.com had a CNAME record pointing to competition.shopify.com.herokudns.com.
  2. They checked Heroku and found that the custom domain 'competition.shopify.com' was unclaimed.
  3. They claimed the domain in Heroku and uploaded a proof-of-concept file.
  4. They also redirected visitors of the index page to shopify.com.

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 takeover happens when a company's subdomain points to an external service that is no longer in use, and someone else can claim that service. Here, the subdomain competition.shopify.com was set up to point to a Heroku app, but that app was not claimed, so the researcher could register it and control what the subdomain showed.

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 from Shopify

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.