Web Cache Poisoing leads to ATO (Account takeover)
The login page was vulnerable to web cache poisoning because the CDN cached responses influenced by a Forwarded header. An attacker could poison the cache so that the login page redirected victims to an attacker-controlled domain, potentially leading to account takeover.
On the company’s Login page, a simple but very vulnerable page, I started by looking at the responses and noticed that the CDN (Cloudflare) was returning a cached page in the JS files and other paths. (Behavior expected)
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
What the attacker needed
Attacker can send requests to the login page; CDN caches responses based on manipulated headers
How it was found
- Send a request to the login page with a Forwarded header pointing to an attacker domain.
- Manipulate the path with directory traversal and a .js query string to make the CDN cache the login page.
- Observe that the response redirects to the attacker domain and is cached.
- Visit the login page normally and see the cached poisoned 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 write-up has not been written yet. The Original tab links to the source.
A web cache stores copies of web pages to make them load faster. If an attacker can trick the cache into storing a malicious version of a page, everyone who visits that page gets the malicious version. Here, the attacker made the login page redirect to their own site, which could steal login details.
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.