Web Cache Deception via URL Parsing Discrepancy — PII Disclosure & Cache Poisoning
The cache layer and the origin application parsed the same URL differently, so a request to a profile API endpoint with a crafted suffix was treated as a cacheable static file by the cache but as the authenticated API endpoint by the origin. This caused the authenticated PII response to be cached and accessible without authentication, and the same primitive could also be used for cache poisoning.
Published on medium.com
Bug Bounty
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.
Context
This is a Web Cache Deception (WCD) finding in an organisation operating at global scale. The report does not name the organisation, the program or the product, and it gives no bounty figure or severity rating. The affected feature is an authenticated API endpoint that returns user profile data:
GET /api/users/profile
The endpoint is an authenticated API endpoint; the cached response is described as containing PII. The finding is that a crafted URL makes the cache layer treat the response as a static, cacheable resource while the origin still resolves the request to that authenticated endpoint.
Setup
The report does not describe accounts, roles, tooling or versions. The only stated precondition is the architecture itself: a caching layer sits in front of the origin application, and the two do not parse and canonicalise URLs the same way. The author frames the request path as passing through several layers, any two of which may disagree:
Browser
→ CDN
→ Reverse Proxy
→ WAF
→ Cache
→ Load Balancer
→ Application
Finding it
The starting point was the observation that the cache layer and the origin application interpret and canonicalise the same URL differently. That discrepancy is the primitive: if you can append something the cache reads as a static file extension, the cache will store the response, while the origin strips or normalises it away and routes the request to the real API endpoint.
Exploitation
Step 1: append a cacheable-looking suffix
The researcher took the target endpoint and appended a suffix built from encoded characters plus a static file extension:
/api/users/profile%3f%26deneme.webp
The %3f is an encoded ? and %26 is an encoded &, followed by deneme.webp. The two layers interpret the same request differently.
Step 2: observe the split interpretation
The same request is read in two ways.
Cache layer: the URL is evaluated as a cacheable resource ending in .webp.
Origin application: after normalising the URL, it processes the real endpoint:
/api/users/profile
Step 3: the resulting chain
The author summarises the effect as follows:
Saldırgan kontrollü URL
→ Cache statik kaynağı görüyor
→ Origin authenticated API endpointi görüyor
→ Kimliği doğrulanmış PII response’u cache’leniyor
→ Kimlik doğrulaması olmadan erişim
In other words: the attacker-controlled URL is seen by the cache as a static resource and by the origin as the authenticated API endpoint, so the authenticated PII response gets cached and can then be retrieved without authentication. The report does not include the raw response body, headers or status codes, so the exact cached content is not shown.
Step 4: cache poisoning on the same primitive
Using the same URL canonicalisation and cache-key primitive, a cache poisoning effect was also observed.
Root cause
The flaw is a parsing and canonicalisation mismatch between the cache layer and the origin application. The cache evaluates the URL as a cacheable resource ending in .webp. The origin normalises the URL and resolves it to /api/users/profile, returning the authenticated user's PII. Because the cache believes it holds a static resource, it stores a response that is in fact private and user-specific.
The implied lesson is architectural: security review has to cover every parsing and normalisation layer the request crosses, not just application logic. Any two layers that disagree about a URL can break a security boundary in unexpected ways.
Impact
The author's chain ends with access without authentication to the cached PII response. The report does not quantify how many users are affected, how long entries live, or whether the cache is shared across users.
The author also stresses that cache poisoning should not be assessed in isolation. Chained with another vulnerability such as XSS, the impact can grow considerably:
Cache Poisoning
→ Stored XSS
→ Unauthorized Action / ATO
A finding that initially looks like a URL parsing or cache behaviour problem can become a much higher-impact attack chain with the right primitive and vulnerability chaining.
Fix
The report gives no remediation; it only notes that every parsing and normalisation layer must be reviewed.
Variants to test
The primitive is generic: find a URL form where the cache sees a static extension and the origin sees the real endpoint. Concrete things to try:
- Encoded delimiters before a static extension, as in this report (
%3f,%26). A positive result is that the cache stores the response under the crafted URL and the origin returns the authenticated endpoint's data. - Other static extensions (
.css,.js,.png,.jpg,.ico) appended after encoded separators. A positive result is the same split: cacheable to the cache, dynamic to the origin. - Path traversal or extra path segments after the endpoint, followed by a static extension. A positive result is that the origin normalises back to the endpoint while the cache keys on the full path.
- Case and encoding variations of the extension and delimiters. A positive result is that one layer normalises the variation and the other does not.
- Re-requesting the crafted URL without credentials after an authenticated request. A positive result is that the private response is returned to the unauthenticated client.
- Applying the same canonicalisation primitive to inject content rather than read it, to test for cache poisoning. A positive result is that a cache poisoning effect is observable through the same primitive.
What happened, in plain words
A security researcher found a bug in a website run by a large global organisation. The bug could let someone fetch a cached private profile response without logging in. The private information is called PII, short for personally identifiable information.
The trick is not a broken password or a stolen login. It is a disagreement about what a web address means. A website is usually built from several pieces that sit in a row, and each piece reads the address a little differently. If one piece thinks the address points to a public picture file and another piece thinks it points to a private user profile, the private answer can end up stored in a shared place where anyone can pick it up.
The researcher also observed a cache poisoning effect through the same primitive. The report does not name the organisation, the bug bounty program, the product, the reward or a severity score. It also does not show the actual private data that came back.
The pieces of a website you need to know
Before the steps make sense, here are the parts of a normal website, explained from zero.
- Browser: the program on your computer, such as Chrome or Firefox, that asks websites for pages and shows them to you.
- Request: the message your browser sends to a website. It says which address you want and carries any proof of who you are.
- API: short for application programming interface. It is a set of addresses a website offers so that programs, not just people, can ask for data. A page you see in a browser is often built from several API answers. An API endpoint is one specific address in that set, for example one that returns a user's profile.
- Cookie or token: a small piece of text your browser keeps after you log in and sends with every request. It is how the website recognises you. Think of it as the wristband you get at an event: show it and you are let back in without queueing at the entrance again.
- Authenticated: a request that carries a valid cookie or token, so the website knows who is asking. Unauthenticated means no valid proof was sent.
- Origin: the actual server that runs the website's logic and holds the real data. It is the source of truth.
- Cache: a storage layer that keeps copies of answers so the next visitor gets them faster. Think of a café that keeps a few sandwiches ready: if you order the same thing, you get the ready one instead of waiting for a new one to be made. A cache is only safe if it stores things that are the same for everybody, like a logo image. It must never store something personal, because the next person in the queue would get your sandwich.
- CDN: content delivery network, a network of cache servers spread around the world that keep copies of files close to visitors.
- Reverse proxy: a server that stands in front of the origin and forwards requests to it, often adding caching or filtering.
- WAF: web application firewall, a filter that inspects requests and blocks ones that look malicious.
- Load balancer: a server that spreads incoming requests across several copies of the application so no single one is overwhelmed.
- URL parsing: reading a web address and deciding what it means. A URL is the address in your browser bar, for example
https://example.com/api/users/profile. - Canonicalisation (or normalisation): turning slightly different spellings of the same address into one standard form. It is like a post office deciding that
Main Street 5,main street 5andMAIN ST. 5all go to the same letterbox. - Web Cache Deception (WCD): the class of bug where an attacker makes a cache store a private answer by disguising the address as something public.
- Cache poisoning: a related bug where an attacker gets harmful or false content stored in the cache, so other visitors receive it.
- PII: personally identifiable information, data that points to a specific person.
- XSS: cross-site scripting, a bug where an attacker gets their own code to run inside another visitor's browser.
- ATO: account takeover, when an attacker gains control of someone else's account.
The feature that was affected
The affected feature is a normal part of many websites: an address that returns the profile of whoever is logged in. The report gives it as:
GET /api/users/profile
Line by line:
GETis the type of request. It means "give me something", as opposed to sending data to the server./api/users/profileis the path, the part of the address after the site name. It points at the profile endpoint.
The endpoint is an authenticated API endpoint; the cached response is described as PII. That answer is meant only for you. A cache should never keep it and hand it to someone else. The bug is that a specially crafted address makes the cache keep it anyway, while the origin still treats the request as a request for this profile endpoint.
The setup
The report does not describe accounts, tools or software versions. The only precondition it states is the shape of the website: a cache sits in front of the origin application, and the two do not read and standardise web addresses in the same way.
The author pictures a request passing through several layers, and points out that any two of them may disagree:
Browser
→ CDN
→ Reverse Proxy
→ WAF
→ Cache
→ Load Balancer
→ Application
Line by line:
Browseris where the request starts, on the visitor's computer.CDNis the first network of cache servers it reaches.Reverse Proxyforwards it onward.WAFinspects it for anything malicious.Cacheis the layer that may store the answer.Load Balancerpicks which copy of the application handles it.Applicationis the origin logic that finally produces the answer.
Each arrow means "then passes to". The point is that the address is read again at every stop, and if two stops read it differently, a security boundary can be crossed by accident.
Finding it
The starting observation was simple: the cache layer and the origin application interpret and standardise the same address differently. That difference is the tool the researcher used. If you can add something to the end of the address that the cache reads as a static file extension, the cache will store the answer. The origin, meanwhile, strips or normalises that addition away and routes the request to the real API endpoint.
A file extension is the ending of a file name, like .jpg for a photo or .webp for a modern image format. Caches are built to store images and other static files for a long time, because those are the same for everyone. That habit is exactly what the trick abuses.
Exploitation
Step 1: append a cacheable-looking suffix
The researcher took the target endpoint and added a suffix made of encoded characters plus a static file extension:
/api/users/profile%3f%26deneme.webp
Line by line:
/api/users/profileis the real endpoint, unchanged.%3fis the encoded form of the?character. In a URL,?normally starts the query string, the part that carries extra settings.%26is the encoded form of the&character, which normally separates settings inside a query string.deneme.webpis a made-up file name ending in.webp, an image format.
Encoding means writing a character in a form that stands for it without being it. %3f stands for ? but is not literally a ? in the raw address. The two layers interpret the same request differently.
Step 2: observe the split interpretation
The same request is read in two ways.
Cache layer: the address is evaluated as a cacheable resource ending in .webp. To the cache it looks like a picture, so it is safe to store.
Origin application: after normalising the address, it processes the real endpoint:
/api/users/profile
Line by line:
/api/users/profileis the endpoint the origin ends up handling once it has cleaned up the address.
So the cache and the origin are looking at the same request and seeing two different things. This is the heart of the bug.
Step 3: the resulting chain
The author summarises the effect as follows:
Saldırgan kontrollü URL
→ Cache statik kaynağı görüyor
→ Origin authenticated API endpointi görüyor
→ Kimliği doğrulanmış PII response’u cache’leniyor
→ Kimlik doğrulaması olmadan erişim
This is in Turkish. Line by line:
Saldırgan kontrollü URLmeans "attacker-controlled URL": the address the attacker chose.Cache statik kaynağı görüyormeans "the cache sees a static resource": the cache thinks it is a fixed file such as an image.Origin authenticated API endpointi görüyormeans "the origin sees the authenticated API endpoint": the origin treats it as the profile request.Kimliği doğrulanmış PII response’u cache’leniyormeans "the authenticated PII response is cached": the private answer gets stored.Kimlik doğrulaması olmadan erişimmeans "access without authentication": anyone can then fetch it without logging in.
In other words: the attacker-controlled address is seen by the cache as a static resource and by the origin as the authenticated API endpoint, so the authenticated PII answer gets cached and can then be retrieved without authentication. The report does not include the raw answer body, headers or status codes, so the exact stored content is not shown.
Step 4: cache poisoning on the same primitive
Using the same address standardisation and cache-key tool, a cache poisoning effect was also observed. A cache key is the label the cache files an answer under, usually the address. If an attacker can influence what is stored under a label other people will request, those people receive the attacker's content.
Root cause
The flaw is a mismatch in parsing and standardisation between the cache layer and the origin application. The cache evaluates the address as a cacheable resource ending in .webp. The origin normalises the address and resolves it to /api/users/profile, returning the logged-in user's PII. Because the cache believes it holds a static resource, it stores an answer that is in fact private and specific to one user.
The lesson it draws is architectural: security review has to cover every parsing and normalisation layer the request crosses, not just the application logic. Any two layers that disagree about an address can break a security boundary in unexpected ways.
Impact
The author's chain ends with access without authentication to the cached PII answer.
The author also stresses that cache poisoning should not be assessed on its own. Chained with another vulnerability such as XSS, the impact can grow considerably:
Cache Poisoning
→ Stored XSS
→ Unauthorized Action / ATO
Line by line:
Cache Poisoningis the first step: harmful content gets stored in the cache.Stored XSSis the second: that content includes code that runs in other visitors' browsers and stays there, because it is served from the cache.Unauthorized Action / ATOis the result: the code acts as the victim, doing things they did not intend, up to account takeover.
A finding that at first looks like an address parsing or cache behaviour problem can become a much higher-impact attack chain with the right tool and vulnerability chaining. Vulnerability chaining means combining several smaller bugs so that together they do more than each one alone.
Fix
The report gives no remediation; it only notes that every parsing and normalisation layer must be reviewed.
Variants to test
The tool is generic: find an address form where the cache sees a static extension and the origin sees the real endpoint. Concrete things to try:
- Encoded separators before a static extension, as in this report (
%3f,%26). A positive result is that the cache stores the answer under the crafted address and the origin returns the authenticated endpoint's data. - Other static extensions (
.css,.js,.png,.jpg,.ico) added after encoded separators. A positive result is the same split: cacheable to the cache, dynamic to the origin. - Path traversal or extra path segments after the endpoint, followed by a static extension. Path traversal means using
..style segments to move around in a file path. A positive result is that the origin normalises back to the endpoint while the cache files on the full path. - Case and encoding variations of the extension and separators. A positive result is that one layer normalises the variation and the other does not.
- Re-requesting the crafted address without credentials after an authenticated request. A positive result is that the private answer is returned to the unauthenticated client.
- Applying the same standardisation tool to inject content rather than read it, to test for cache poisoning. A positive result is that a cache poisoning effect is observable through the same primitive.
Glossary
- API: a set of addresses a website offers so programs can ask it for data.
- API endpoint: one specific address in that set, such as the one returning a user profile.
- Authenticated: a request that carries valid proof of who is asking, such as a cookie or token.
- Browser: the program on your computer that requests and displays websites.
- Cache: a storage layer that keeps copies of answers so later visitors get them faster.
- Cache key: the label a cache files a stored answer under, usually the address.
- Cache poisoning: getting harmful or false content stored in a cache so other visitors receive it.
- Canonicalisation (normalisation): turning different spellings of the same address into one standard form.
- CDN (content delivery network): a network of cache servers spread around the world.
- Cookie or token: a small piece of text your browser keeps after logging in and sends with each request so the site recognises you.
- Encoded character: a character written in a stand-in form, such as
%3ffor?. - File extension: the ending of a file name, such as
.webp, that hints at the file type. - GET: the request type that means "give me something".
- Load balancer: a server that spreads requests across several copies of an application.
- Path traversal: using
..style segments in a path to move around in a file system. - Query string: the part of an address after
?that carries extra settings. - Request: the message a browser sends to a website asking for something.
- Reverse proxy: a server that stands in front of the origin and forwards requests to it.
- Unauthenticated: a request with no valid proof of who is asking.
- URL: a web address.
- Vulnerability chaining: combining several smaller bugs so that together they do more than each one alone.
- Web Cache Deception (WCD): a bug where an attacker makes a cache store a private answer by disguising the address as something public.