Skip to content
Cache bugs Disclosed report Intermediate

Denial of Access to Static Resources via Cache Poisoning on addons.allizom.org

The origin server honours the X-HTTP-Method-Override header and treats a request as HEAD, returning a 200 OK with an empty body that gets cached. An attacker could poison the cache so that static resources like images and JavaScript files become unavailable to all users.

jabiyev Follow

Originally disclosed on HackerOne

  • Fixed in 13 days
  • Disclosed after 46 days

Summary by the program

A cache poisoning vulnerability has been identified on addons.allizom.org that allows an attacker to block access to static resources such as images and JavaScript files. The issue exploits the processing of the X-HTTP-Method-Override header by the origin server which honors the X-HTTP-Method-Override header and treats the request as a HEAD request. Therefore, it generates a "200 OK" response with an empty body, which gets cached and as a result the resource becomes unavailable for all users

The report

Summary:

An attacker can poison the cache and block access to static files (e.g., image, JS) that are delivered with the homepage.

Steps To Reproduce:

To reproduce cache poisoning for an image file:

  1. curl -H "X-HTTP-Method-Override: HEAD" https://addons.allizom.org/static-server/img/addon-icons/default-64.d144b50f2bb8.png?dontpoisoneveryone=1
  2. Visit https://addons.allizom.org/static-server/img/addon-icons/default-64.d144b50f2bb8.png?dontpoisoneveryone=1 to see it is not accessible anymore.

To reproduce cache poisoning for a JS file:

For example, /static-frontend/amo-6203ce93d8491106ca21.js is one of the JS files delivered with the homepage. We did not find a way to safely test (i.e., using ?dontpoisoneveryone=1), since it does not include the query string as a part of the cache key. However, we noticed that the X-HTTP-Method-Override: HEADheader is honored in the same way.

  1. curl -s https://addons.allizom.org/static-frontend/amo-6203ce93d8491106ca21.js/notexist (see the error message in the response body)
  2. curl -s -H "X-HTTP-Method-Override: HEAD" https://addons.allizom.org/static-frontend/amo-6203ce93d8491106ca21.js/notexist (see the empty response body)

Supporting Material/References:

Behind the scenes, the origin server honors the X-HTTP-Method-Override header and treats the request as a HEAD request. Therefore, it generates a "200 OK" response with an empty body, which gets cached and as a result the resource becomes unavailable for all users. To learn more about the attack, you can read the document listed below.

Impact

Summary:

An attacker can make static resources such as images and JS files that are delivered with the homepage inaccessible to all users.

The original report as published on HackerOne, by jabiyev. 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 origin server honoured the X-HTTP-Method-Override header and returned an empty 200 OK response for a HEAD request, which the cache then stored as the resource.

Impact

An attacker could make static resources such as images and JavaScript files that are delivered with the homepage inaccessible to all users.

What the attacker needed

No authentication required; ability to send HTTP requests with custom headers

How it was found

  1. Send a request for an image file with the X-HTTP-Method-Override header set to HEAD.
  2. Visit the same image URL to confirm it is no longer accessible.
  3. Send a request for a JavaScript file with a non-existent path to see an error message.
  4. Send the same request with the X-HTTP-Method-Override header set to HEAD to see an empty response body.

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 is a store that keeps copies of files so they load faster for everyone. The server was tricked into saving an empty copy of a file, so when other people asked for it they got nothing. This meant images and scripts on the homepage stopped working for all visitors.

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

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.