Cache Deception Without Path Confusion
The front-end cache keyed on a client-supplied reqIdentifier parameter, so a GET request to a GraphQL endpoint returning the logged-in user's PII could be cached. An attacker could send a crafted URL to a victim, have the victim's sensitive data cached, and then retrieve it without authentication.
Published on kuldeep.io
Today, we’ll talk about a unique case of a cache deception vulnerability that I found in one of the Synack Red Team targets. I call this particular case of cache deception vulnerability unique because unlike the usual cache deception exploits, this exploit did not rely on path confusion.
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 cache key included a user-controlled reqIdentifier parameter, allowing an attacker to force caching of a dynamic GraphQL response containing PII.
Impact
An attacker could retrieve a victim's PII (email, name, roles, birth date, geolocation) without authentication, provided the victim visits the crafted URL while logged in and the cache has not expired.
What the attacker needed
Victim is logged in; victim visits crafted URL; cookie-based authentication; cache not expired
How it was found
- Log in as a normal user and note interesting endpoints that return PII and use cookie authentication.
- Check responses for cache HIT headers to find cacheable endpoints.
- Convert a POST GraphQL query for user details into a GET request and add the reqIdentifier parameter.
- Open the crafted URL in the victim's logged-in session to cache the PII response.
- Open the same URL in an incognito window to retrieve the cached victim PII without authentication.
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 cache is a fast storage layer that keeps copies of responses so the server does not have to rebuild them. Here, the cache decided what to store using a value the client controls, so an attacker could make a page with private data get stored and then read it later. This is called web cache deception.
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.