DOS via cache poisoning on [developer.mozilla.org]
The report shows that adding an X-Forwarded-Host header with a value that causes a 404 error can poison the cache, making the page return a 404 to all users. An attacker could use this to cause a denial of service on the site indefinitely.
- Triaged in 8 days
- Fixed in 18 days
- Disclosed after 29 days
Summary:
Hello, after some research it appears that it is possible for an attacker to perform a DOS attack on the https://developer.mozilla.org page for an indefinite period.
This is possible by adding an X-Forwarded-Host header and a value causing an error on the back-end side (error 404), the bad configuration of the cache makes it possible to save the response there and to serve it to users visiting the page, making the page completely inaccessible for an indefinite period.
No information about the caching period is available in the response, but it is anyway possible to reinterpret the manipulation indefinitely.
For obvious reasons I performed my tests using a cache-buster - adding a URL parameter as we will see in the POC - so as not to affect the user experience.
Steps To Reproduce:
- Pass your HTTP requests through your preferred proxy
- Go to : https://developer.mozilla.org then - in your proxy - send the request to your repeater
- Add the parameter of your choice to the URL, it will serve as a cache-buster and will not "poison" the site visited by users. In other words, the DOS will only be effective on the URL containing your parameter, you probably know this but let me clarify: this is very important in order not to damage the services.
- Add the following header :
X-Forwarded-Host: XXX
The request ready to send (?my_cache_buster=test) being my cache-buster :

Once the request has been sent, the response will - as expected - contain a 404 error. Open another browser in incognito mode, and enter the full URL containing your cache-buster. You should get a 404 error. If this is still not the case, resend the request several times until the cache is poisoned :

Impact
An attacker can perform this attack (without a cache-buster this time) in order to make the service unavailable indefinitely. It is also possible in the case where the cache will be reset to make a small script to send requests every minute (for example) so that the cache is permanently poisoned making the site completely unavailable and causing financial damage to the company.
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 cache is configured to store responses based on the request URL without considering the X-Forwarded-Host header, allowing an attacker to poison the cache with an error response.
Impact
An attacker could make the service unavailable indefinitely by poisoning the cache, and could even automate requests to keep the cache poisoned if it is reset.
What the attacker needed
Ability to send HTTP requests with custom headers; target uses a cache that stores error responses
How it was found
- Send a request to the target URL through a proxy.
- Add a cache-buster parameter to the URL to avoid affecting other users.
- Add an X-Forwarded-Host header with a value that causes a 404 error.
- Send the request and observe the 404 response.
- Open the URL with the cache-buster in an incognito window to confirm the cached 404.
- Resend the request multiple times if the cache is not yet poisoned.
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 storage layer that keeps copies of web pages to serve them faster. If an attacker can trick the cache into storing an error page instead of the real page, then everyone who visits that URL will see the error. This report shows that by adding a special header, an attacker could make a page return a 404 error and have that error cached, effectively taking the page offline.
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.