Skip to content
Cache bugs Disclosed report Intermediate

Static files on HackerOne.com can be made inaccessible through Cache Poisoning attack

The host hackerone.com caches static files via Cloudflare, and the x-forwarded-scheme header can cause a redirect loop that gets cached. An attacker could make any cached static file inaccessible, causing a denial of service on pages that rely on it.

youstin Follow

Originally disclosed on HackerOne

Medium 4.4 View original
  • Triaged in 25 days
  • Fixed in 25 days
  • Paid in 55 days
  • Disclosed after 8 months

Summary by the researcher

For more details about the vulnerability, check out: https://youst.in/posts/cache-poisoning-at-scale/

The report

Summary:

Hi,

The host hackerone.com uses cloudlfare to cache static files. The header x-forwarded-scheme can be used to cause a redirect loop, which will be cached by cloudflare. By taking down a JS file, it is possible to cause a total loss of availability on hackerone.com

Disclaimer

No actual denial of service attack was caused in my testing. All the testing used cache-busters, meaning it did not affect the live website in any way

Steps To Reproduce

  1. Send the following request:
HTTP
GET /assets/static/js/8.9572d249.chunk.js?hackerone=poc HTTP/2
Host: hackerone.com
x-forwarded-scheme: http

make sure to use a get parameter as a cachebuster

  1. You should notice a 301 redirect to the same page. Since the redirect poins to the same exact page, it will not be a redirect loop. The 301 is cached and removing the header will show the same redirect loop.

Video PoC

████

Impact

The same attack that was reproduced on /assets/static/js/8.9572d249.chunk.js?hackerone=poc could be reproduced on the actual file without any random parameter. This would cause the file to no longer be accessible, hence causing a DoS on any pages relying on that js file. This works on any file that is cached on hackerone.com/*, including images, css files, js files etc. Other than js files that would make the page unusuable, an attacker could also make images unavailable, etc.

The original report as published on HackerOne, by youstin. 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

Impact

An attacker could make any cached static file (JS, CSS, images) inaccessible, causing a denial of service on pages that rely on those files.

What the attacker needed

None

How it was found

  1. Send a GET request for a static file with a cache-busting query parameter and the x-forwarded-scheme header set to http.
  2. Observe a 301 redirect to the same page, which is cached.
  3. Remove the header and see the same redirect loop, confirming the poisoned cache.

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 cache stores copies of files so they load quickly. Sending the x-forwarded-scheme header caused a redirect to the same page, which the cache stored. Requesting the file without the header still returned the broken cached response, making the file unavailable.

What is Cache bugs?

A cache and the origin disagree about a request, so a poisoned response is served to everyone or a private page is stored as public.

More by youstin

View all

5 more disclosed reports, best first.

More from HackerOne

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Web cache poisoning and deception

The lesson behind this report.

A cache and the origin disagree about a request, so a poisoned response is served to everyone or a private page is stored as public.