From Minor Bug to Major DoS: My Journey with Web Cache Poisoning
The samlsso endpoint accepted an X-Https header that caused a 301 redirect, and when combined with a cacheable endpoint, the redirect response was cached, leading to an infinite redirect loop for users. An attacker could poison the cache to cause a denial of service on multiple endpoints.
medium.com
Published on medium.com
It started with a routine exploration of the samlsso endpoint on a [redacted] platform. At first, it seemed like a typical authentication endpoint, but a small anomaly hinted at something deeper.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the server did not include the X-Https header in its cache key, so a response influenced by that header was cached and served to other users.
Impact
An attacker could cause a denial of service on multiple endpoints by poisoning the cache, making the site unusable for legitimate users.
What the attacker needed
Ability to send requests with custom headers; cacheable endpoints that reflect the X-Https header
The fix
The vulnerability was fixed according to the report.
How it was found
- Send a request to the samlsso endpoint with an X-Https header and observe a 301 redirect.
- Use a script to test cacheable endpoints with the X-Https header and a cache buster.
- Identify endpoints that cause infinite redirects when the header is present.
- Open the vulnerable URLs in a browser to confirm the infinite redirect loop.
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 write-up has not been written yet. The Original tab links to the source.
A web cache stores copies of responses to speed up loading. If an attacker can make the cache store a malicious response, like a redirect that points to itself, then every visitor gets stuck in a loop and cannot access the site. This is called web cache poisoning.
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.