Skip to content
Subdomain takeover Disclosed report Intermediate

Subdomain take-over of {REDACTED}.18f.gov

A subdomain of 18f.gov was vulnerable to subdomain takeover because the server used a fallback domain for unknown requests, allowing an attacker to serve content on that subdomain. The issue was fixed by disabling the fallback.

jackds Follow

Originally disclosed on HackerOne

  • Triaged in 15 hours
  • Fixed in 5 days
  • Disclosed after 11 days

Summary by the program

@jackds discovered a number of related subdomain takeover attacks against some subdomains of 18f.gov.

Technically, these domains are out of scope for our Vulnerability Disclosure Policy. We want to remind hackers to please limit their testing to domains explicitly listed in that scope (which is repeated on our HackerOne program page for convenience). This is for your own safety: we want to be sure that everyone's on the same page about your activities being authorized.

That said, this was a legitimate vulnerability, which we fixed, and we're disclosing details because they may be useful to other folks who operate services like ours.

We couldn't just remove the DNS entries, since those are used for internal purposes with agency CNAMEs. However, there were other ways we were able to resolve this by routing requests for unknown domains differently, and now serve 404s for these subdomains.

A few more details about the cause and solutions:

  • For the subdomain in question, this was caused by a combination of how were routing requests to unknown domains and how we served static websites.
  • The basic issue was that our servers used our {REDACTED}.18f.gov domain as a fallback for any unknown domain requests routed to us. So if a request came in for particular subdomains, we would end up treating it sort of like a request to https://{REDACTED}.18f.gov. Since we proxied our home page requests to the same host where {REDACTED}.18f.gov's static site is currently hosted, and we passed along the original HTTP Host header for these unknown domains, it meant that the host would respond as if that unknown domain had been accessed directly on that host. As demonstrated, users could then to serve up content on these other domains.
  • So all that being said, the fix was actually straightforward, since it just involved disabling using the {REDACTED}.18f.gov website as a fallback for unknown domains. This should mean that the only requests we forward now are actually ones for the {REDACTED}.18f.gov domain.

Thanks for the find, @jackds - we really appreciate it!

[See also #263902, which was an independent discovery of the same issue on a different subdomain.]

The original report as published on HackerOne, by jackds. 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 the server's fallback routing for unknown domains combined with proxying to a static site host while preserving the original Host header, allowing content to be served on unintended domains.

Impact

An attacker could serve content on the affected subdomain.

The fix

The fallback routing was disabled so that only requests for the intended domain are forwarded.

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.

Here, the server treated unknown domains as a specific internal site and passed the original Host header, so an attacker could serve content on the subdomain.

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 jackds

View all

6 more disclosed reports, best first.

More from GSA Bounty

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.