Cache poisoning Denial of Service affecting assets.gitlab-static.net
The CDN caching static assets accepted an x-http-method-override header that changed a GET request into a HEAD request, and the resulting empty response was cached and served to other users. An attacker could clear the cache with PURGE and poison it with empty responses, causing a denial of service on gitlab.com.
- Triaged in 9 days
- Fixed in 8 months
- Paid in 9 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,
Gitlab.com is hosting JS and CSS on https://assets.gitlab-static.net/ and uses them on gitlab.com/*
The static files seem to be stored on a gcp host, which by default accepts the x-http-method-override header. Since the CDN is using Varnish to cache files, I was able to combine the GCP behaviour and poison the cache into returning an empty resource, inherenetly causing a denial of service on gitlab.com and all gitlab assets that use the specific cdn.
Disclaimer
No actual denial of service attack was caused troughout my testing. All the testing used cache-busters, meaning it did not affect the live website in any way.
Steps to reproduce
- Sending a request such as:
GET /assets/webpack/commons-pages.admin.sessions-pages.groups.omniauth_callbacks-pages.ldap.omniauth_callbacks-pages.omn-c3aaf8c4.3f9d44ba.chunk.js HTTP/1.1
Host: assets.gitlab-static.net
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0
Connection: close
will return the expected js file. By taking a quick look at the response headers, we can see the file is currently cached by varnish because of the following headers:
Age: 498
X-Served-By: cache-dca17752-DCA, cache-osl6520-OSL
X-Cache: HIT, HIT
X-Cache-Hits: 1, 1
- In order to test cache poisoning without affecting the live website, we can add random query parameters that will act as cache busters. In order to poison a resource, an attacker would send the following request:
GET /assets/webpack/commons-pages.admin.sessions-pages.groups.omniauth_callbacks-pages.ldap.omniauth_callbacks-pages.omn-c3aaf8c4.3f9d44ba.chunk.js?cb=youstin-xyz HTTP/1.1
Host: assets.gitlab-static.net
x-http-method-override: HEAD
This will return an empty response, as it is expected from a HEAD request. However since the x-http-method-override header is not included in the cache key and the varnish configuration used does not proccess the x-http-method-override, this empty response will also be forwarded to all other users requesting the file, with normal GET requests.

You can also confirm the cache can be poisoned by visiting the file in your browser, making sure to include the parameter used as a cachebuster. You should notice the empty repsonse, typical to a HEAD request.
This vulnerability can be used on files used by the live site even if they are already cached, by making use of the PURGE http method, which clears the cache, allowing for an easily reproducible DoS attack.
Impact
Since Gitlab does not forbid unauthorized users from using the PURGE http method, which clears the cache, it is possible for an attacker to clear the cache for actual JS or CSS files used on gitlab.com and poison it with an empty response. Doing so will lead to missing JS and CSS files, making gitlab completely unuseable. This vulnerability affects all instances of gitlab where the cdn is used for JS and CSS files.
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 CDN cache key did not include the x-http-method-override header, and the origin honoured that header to change the request method, so a HEAD response was cached for GET requests.
Impact
An attacker could clear the cache for real JS or CSS files and poison them with empty responses, making gitlab.com completely unusable; the report notes that testing used cache busters and no actual denial of service was caused.
What the attacker needed
No authentication needed; target uses the affected CDN for assets
How it was found
- Send a normal GET request for a static JS file and observe that it is cached by Varnish.
- Add a random query parameter as a cache buster to avoid affecting live users.
- Send a GET request with the x-http-method-override header set to HEAD, which returns an empty response.
- Confirm the empty response is cached and served to subsequent normal GET requests for the same URL.
- Use the PURGE method to clear the cache for a live asset, then poison it with an empty response.
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 content delivery network (CDN) stores copies of files so they load faster. The site's CDN trusted a special header that told it to treat a normal download request as a check-only request, which returns no file content. Because the CDN saved that empty answer, everyone else got an empty file too, breaking the website.
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.