The Cache That Trusted a Fake Extension
PayPal's origin server would render a personalised account page when a static-looking suffix was appended to the URL, and the shared cache stored that HTML under a public key. An attacker could then request the cached URL without authentication and read another user's account details.
medium.com
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
PayPal's account pages are personalised HTML: they render data tied to the logged-in user. Alongside those pages, PayPal serves genuinely public static assets such as stylesheets, scripts and images, and those assets are the kind of thing a shared cache or CDN is meant to store and hand to many visitors.
Web cache deception sits in the gap between those two worlds. The origin decides what a URL means and what it returns; the cache decides whether to store that response and under which key. When the two disagree about the same URL, a private response can end up in a shared store. Omer Gil reported this class of issue against PayPal, and PayPal fixed it and paid $3,000, per the researcher. The disclosure dates from 2017.

AI-generated illustration.
Setup
The report does not describe a lab setup, specific accounts, roles, tools or versions. It is an analytical case study of a public disclosure rather than a reproduction, and it deliberately omits reproduction details. What it does give is the shape of the two preconditions that have to hold at the same time:
- The origin's routing treats extra path segments after a document route as irrelevant and still renders that document.
- The edge cache or CDN is configured to store objects that look static from the path, sometimes ignoring the origin's own cache-control guidance for those lookups.
The kind of URL involved is a personalised account path with a static-looking suffix appended:
https://www.paypal.com/myaccount/home/stylesheet.css
Finding it
The observation is a mismatch, not a single broken parameter. A URL like the one above is ambiguous: to the application it is still the account home route with a leftover segment, so it renders personalised HTML; to the cache it ends in .css, so it looks like a static file worth storing. Neither behaviour is unreasonable on its own. The problem is that they apply to the same request.
Gil framed the issue as a class of misalignment between origin routing and cache classification, with PayPal as the public case he was permitted to name. Other applications he tested were affected too but could not be named.
Exploitation
The report describes the mechanism at a high level and does not publish a step-by-step request sequence. The chain is:
- An authenticated user requests a document route with an extra segment appended that resembles a static file, for example the
stylesheet.csssuffix on the account home path shown above. - The origin's router ignores the extra segment and returns the personalised account HTML for that user.
- The cache classifies the response as static from the path suffix and writes the HTML into the shared store under that URL.
- A later, unauthenticated visitor requests the same URL and is served the cached personalised HTML from the shared cache.
The report does not include the raw HTTP requests or responses, the cache headers involved, or the exact cache key. It states only that the personalised HTML could be written into a shared cache under a key that later visitors can request without authenticating.
Root cause
The mistake is a disagreement about what a URL means. The origin routes by the matched document route and ignores trailing segments; the cache classifies by the path suffix and treats anything that looks static as cacheable. When the cache also ignores the origin's cache-control guidance for those lookups, the origin's intent to keep the response private never reaches the storage decision.
A file-looking suffix is not a content type, and it is not permission to cache.
Impact
On PayPal, the researcher reported that cached account pages could expose:
- first and last names
- account balances
- the last four digits of payment cards
- transaction details
- a full passport number
- email addresses
- home addresses
- telephone numbers
- any other fields rendered on the affected views
In other applications he was not allowed to name, he wrote that session identifiers or password-recovery answers appearing in HTML could have enabled account takeover. Those wider consequences are stated as possibilities in unnamed applications, not as confirmed outcomes on PayPal.
Fix
PayPal fixed the issue; the report does not describe the specific change. The remediation below is the author's own analysis, offered as defence in depth.
- Let the origin decide freshness. A shared cache should store a response only when the origin marks it public and reusable. Path shape is a hint at best, never a reason to override
privateorno-storedirectives. - Classify by the matched route and the content type, not a suffix. If the application route serves a document, or the body is HTML, refuse to cache it in a shared store.
- Make leftover suffixes fail closed at the origin. A document route asked to look like an extra static file should return a client error or a redirect to the canonical path, not the personalised document under the longer URL.
- Split the asset host. Serve stylesheets, scripts and images from a cookie-less hostname that never renders account HTML.
- Monitor unexpected cache writes. Alert when HTML is stored under an asset-like key, and keep authenticated page lifetimes at zero in the shared tier.
The author offers this illustrative decision function for a shared cache:
def allow_shared_cache(request, response, matched_route): cc = response.cache_control if cc.no_store or cc.private or cc.no_cache: return False if response.content_type.startswith("text/html"): return False if request.authenticated or response.varies_on_cookie: return False if matched_route is None or matched_route.serves_documents: return False return bool(cc.public and cc.max_age > 0)
Variants to test
Concrete things to try on other targets, each with what a positive result looks like:
- Append a static-looking suffix to a personalised document route. Request an authenticated account page with a trailing segment such as
.css,.jsor.png. A positive result is the same personalised HTML returned under the longer URL. - Request the same URL unauthenticated from a second client. A positive result is the personalised HTML served from the shared cache without credentials.
- Check whether the cache honours the origin's cache-control. Compare a response marked
privateorno-storewith what the cache actually stores for a static-looking path. A positive result is the cache storing it anyway. - Test routes that ignore trailing segments. Try document routes with extra path segments and see whether the router still renders the document. A positive result is a 200 with the document body rather than a client error or redirect.
- Look for sensitive fields in the rendered HTML. Check whether the cached views contain session identifiers, password-recovery answers or other values that would enable account takeover. A positive result is any such value appearing in a response served from the shared cache.
The origin and the cache have to agree on what a URL means, or the cache will invent a public copy of a private page.
What happened, in plain words
PayPal's website has two very different kinds of pages. Some are private and personal: your account home, your balance, your transactions. Others are public and identical for everyone: stylesheets (the files that tell a browser how a page should look), scripts (code that makes a page interactive) and images. Public files like these are often stored by a shared cache, a computer that sits between visitors and the website and keeps copies of popular files so it can hand them out quickly to many people.
The problem Omer Gil found was that PayPal could be tricked into putting a private, personal account page into that shared cache, where anyone could then fetch it without logging in. The trick was to add a suffix to the account page's web address that made it look like a static file. The website still treated the address as the account page and returned the personal HTML. The cache looked at the end of the address, saw something that looked like a static file, and stored the personal page as if it were a public asset.
PayPal fixed the issue and paid $3,000, according to the researcher. The disclosure dates from 2017.

AI-generated illustration.
The two worlds that collided
To understand the bug, you need to know what a few everyday web concepts mean.
- HTML is the language web pages are written in. When you visit a page, your browser receives HTML and turns it into the text, links and layout you see.
- Personalised HTML is HTML that has been filled in with data about you: your name, your balance, your recent orders. The server builds it fresh for each logged-in user.
- Static assets are files that are the same for every visitor: a stylesheet that sets the font, a script that powers a button, a logo image. Because they never change from person to person, they are safe to copy and share.
- A cache is a storage layer that keeps copies of responses so they can be served faster next time. A shared cache (often part of a CDN, a content delivery network) keeps one copy for many visitors, not one per person.
- The origin is the actual web server that runs the application and decides what each address means and what to send back.
Web cache deception lives in the gap between the origin and the cache. The origin decides what a URL means and what it returns. The cache decides whether to store that response and under which key (the label it uses to find the stored copy later). When the two disagree about the same URL, a private response can end up in a shared store.
Setup: what has to be true at the same time
The report does not describe a lab setup, specific accounts, roles, tools or versions. It is an analytical case study of a public disclosure rather than a reproduction, and it deliberately omits reproduction details. What it does give is the shape of the two preconditions that have to hold at the same time:
- The origin's routing treats extra path segments after a document route as irrelevant and still renders that document.
- The edge cache or CDN is configured to store objects that look static from the path, sometimes ignoring the origin's own cache-control guidance for those lookups.
In plain words: the website's address-matching system ignores anything tacked onto the end of a known page address and still shows that page. Separately, the cache decides what to store by looking at the end of the address, and if it looks like a static file it stores it, sometimes without listening to the website's own instructions about whether the page is private.
The kind of URL involved is a personalised account path with a static-looking suffix appended:
https://www.paypal.com/myaccount/home/stylesheet.css
This is a web address. The part /myaccount/home is the account home page. The part /stylesheet.css looks like the name of a stylesheet file. To a person it is one address; to the website and to the cache it can mean two different things.
Finding it: a mismatch, not a broken parameter
The observation is a mismatch, not a single broken parameter. A URL like the one above is ambiguous: to the application it is still the account home route with a leftover segment, so it renders personalised HTML; to the cache it ends in .css, so it looks like a static file worth storing. Neither behaviour is unreasonable on its own. The problem is that they apply to the same request.
Think of a building with two receptionists. One checks your name against the visitor list and lets you into the private office. The other sees a delivery label that says "office supplies" and puts the parcel on the public shelf. Each is doing a sensible job. The mistake is that they are looking at the same parcel and reaching different conclusions.
Gil framed the issue as a class of misalignment between origin routing and cache classification, with PayPal as the public case he was permitted to name. Other applications he tested were affected too but could not be named.
Exploitation: how the private page ends up in the shared cache
The report describes the mechanism at a high level and does not publish a step-by-step request sequence. The chain is:
- An authenticated user requests a document route with an extra segment appended that resembles a static file, for example the
stylesheet.csssuffix on the account home path shown above. - The origin's router ignores the extra segment and returns the personalised account HTML for that user.
- The cache classifies the response as static from the path suffix and writes the HTML into the shared store under that URL.
- A later, unauthenticated visitor requests the same URL and is served the cached personalised HTML from the shared cache.
Here is what each step means for someone new to this.
Step 1. An authenticated user is someone who has logged in, so the website knows who they are. A document route is a web address that the application treats as a page. The user asks for that page but adds an extra piece at the end that looks like a static file name.
Step 2. The website's router is the part that matches an incoming address to the code that should handle it. It sees the known account page address and ignores the extra piece, so it builds and returns the personal HTML for that user.
Step 3. The cache sees the response and looks at the address. Because the address ends in something like .css, the cache decides this is a static file and stores a copy under that address. The cache key is the label it uses to find that copy later, and here the key is the full address including the fake suffix.
Step 4. A different person, who has not logged in, asks for the same address. The cache finds the stored copy and hands it over. That person now sees the first user's personal page without ever logging in.
The report does not include the raw HTTP requests or responses, the cache headers involved, or the exact cache key. It states only that the personalised HTML could be written into a shared cache under a key that later visitors can request without authenticating.
Root cause: a disagreement about what a URL means
The mistake is a disagreement about what a URL means. The origin routes by the matched document route and ignores trailing segments; the cache classifies by the path suffix and treats anything that looks static as cacheable. When the cache also ignores the origin's cache-control guidance for those lookups, the origin's intent to keep the response private never reaches the storage decision.
Cache-control is the set of instructions a website sends with a response to tell caches what they may do with it. A response marked private should not be stored in a shared cache. A response marked no-store should not be stored at all. If the cache ignores those instructions for addresses that look static, the website's wishes are lost.
A file-looking suffix is not a content type, and it is not permission to cache.
Impact: what could be exposed
On PayPal, the researcher reported that cached account pages could expose:
- first and last names
- account balances
- the last four digits of payment cards
- transaction details
- a full passport number
- email addresses
- home addresses
- telephone numbers
- any other fields rendered on the affected views
In other applications he was not allowed to name, he wrote that session identifiers or password-recovery answers appearing in HTML could have enabled account takeover. A session identifier is the value that keeps you logged in as you move between pages; if someone else gets it, they can act as you. Password-recovery answers are the secret questions used to reset a password. Those wider consequences are stated as possibilities in unnamed applications, not as confirmed outcomes on PayPal.
Fix: five layers of defence
PayPal fixed the issue; the report does not describe the specific change. The remediation below is the author's own analysis, offered as defence in depth, meaning several independent safeguards so that one mistake does not open the door.
- Let the origin decide freshness. A shared cache should store a response only when the origin marks it public and reusable. Path shape is a hint at best, never a reason to override
privateorno-storedirectives. In everyday terms: the website is the boss. If it says the page is private, the cache must not store it, no matter what the address looks like. - Classify by the matched route and the content type, not a suffix. If the application route serves a document, or the body is HTML, refuse to cache it in a shared store. The cache should look at what the response actually is, not at the letters at the end of the address.
- Make leftover suffixes fail closed at the origin. A document route asked to look like an extra static file should return a client error or a redirect to the canonical path, not the personalised document under the longer URL. Failing closed means that when in doubt, refuse rather than allow. The canonical path is the clean, official address of the page.
- Split the asset host. Serve stylesheets, scripts and images from a cookie-less hostname that never renders account HTML. A cookie is a small piece of data your browser stores for a website, often used to keep you logged in. If static files come from a separate address that never receives cookies and never shows account pages, then a trick like this one has nothing private to leak.
- Monitor unexpected cache writes. Alert when HTML is stored under an asset-like key, and keep authenticated page lifetimes at zero in the shared tier. In other words, watch for the unusual event of a web page being stored where only images and stylesheets should live, and make sure logged-in pages are never kept in the shared cache at all.
The author offers this illustrative decision function for a shared cache:
def allow_shared_cache(request, response, matched_route): cc = response.cache_control if cc.no_store or cc.private or cc.no_cache: return False if response.content_type.startswith("text/html"): return False if request.authenticated or response.varies_on_cookie: return False if matched_route is None or matched_route.serves_documents: return False return bool(cc.public and cc.max_age > 0)
Line by line, in plain words:
def allow_shared_cache(request, response, matched_route):defines a function that decides whether a response may go into a shared cache. It receives three things: the incoming request, the response the website wants to send, and the route that matched the address.cc = response.cache_controlgives a short name,cc, to the cache-control instructions attached to the response.if cc.no_store or cc.private or cc.no_cache:checks whether the website said the response must not be stored, is private, or must not be reused without checking again.return Falsemeans: do not store it. If any of those instructions is present, the answer is no.if response.content_type.startswith("text/html"):checks whether the body of the response is HTML, meaning a web page rather than an image or a stylesheet.return Falseagain means: do not store it. Web pages do not belong in a shared cache.if request.authenticated or response.varies_on_cookie:checks whether the request came from a logged-in user, or whether the response changes depending on the cookie sent.return Falsemeans: do not store it. Anything tied to a logged-in user or to a cookie is personal.if matched_route is None or matched_route.serves_documents:checks whether no route matched, or whether the matched route serves documents (pages).return Falsemeans: do not store it. If the address is a page route, it is not a static asset.return bool(cc.public and cc.max_age > 0)is the only path that allows storing. It requires the website to have explicitly marked the response as public and given it a positive lifetime, meaning it is allowed to be reused for some time.
Variants to test: what to look for on other sites
Concrete things to try on other targets, each with what a positive result looks like:
- Append a static-looking suffix to a personalised document route. Request an authenticated account page with a trailing segment such as
.css,.jsor.png. A positive result is the same personalised HTML returned under the longer URL. - Request the same URL unauthenticated from a second client. A positive result is the personalised HTML served from the shared cache without credentials.
- Check whether the cache honours the origin's cache-control. Compare a response marked
privateorno-storewith what the cache actually stores for a static-looking path. A positive result is the cache storing it anyway. - Test routes that ignore trailing segments. Try document routes with extra path segments and see whether the router still renders the document. A positive result is a 200 with the document body rather than a client error or redirect. A 200 is the standard HTTP status code for success.
- Look for sensitive fields in the rendered HTML. Check whether the cached views contain session identifiers, password-recovery answers or other values that would enable account takeover. A positive result is any such value appearing in a response served from the shared cache.
The origin and the cache have to agree on what a URL means, or the cache will invent a public copy of a private page.
Glossary
- HTML: the language web pages are written in; the browser turns it into the page you see.
- Personalised HTML: a web page built with data about a specific logged-in user.
- Static asset: a file that is the same for every visitor, such as a stylesheet, script or image.
- Stylesheet: a file that tells the browser how a page should look.
- Script: code that makes a web page interactive.
- Cache: a storage layer that keeps copies of responses so they can be served faster.
- Shared cache: a cache that keeps one copy for many visitors, often part of a CDN.
- CDN (content delivery network): a network of servers that store and deliver content close to visitors.
- Origin: the actual web server that runs the application and decides what each address returns.
- Cache key: the label a cache uses to find a stored copy later.
- Cache-control: instructions a website sends with a response to tell caches what they may do with it.
private: a cache-control instruction meaning the response must not be stored in a shared cache.no-store: a cache-control instruction meaning the response must not be stored at all.no-cache: a cache-control instruction meaning a stored copy must be rechecked before reuse.public: a cache-control instruction meaning the response may be stored in a shared cache.max-age: a cache-control instruction giving the number of seconds a response may be reused.- Router: the part of a website that matches an incoming address to the code that handles it.
- Route: a rule that maps an address to a handler in the application.
- Document route: a route that serves a web page.
- Path suffix: the part at the end of a web address, such as
.css. - Content type: the label that says what kind of data a response contains, such as HTML or an image.
- Cookie: a small piece of data your browser stores for a website, often used to keep you logged in.
- Session identifier: the value that keeps you logged in as you move between pages.
- Authenticated: known to the website because you have logged in.
- Unauthenticated: not logged in.
- Web cache deception: a class of bug where a private response is stored in a shared cache under a public-looking address.
- Cache poisoning: a related idea where an attacker causes a bad response to be stored for others; not the issue described here.
- Account takeover: when someone else gains control of your account.
- HTTP status code: a number a server sends to say how a request went; 200 means success.
- Fail closed: when in doubt, refuse rather than allow.
- Canonical path: the clean, official address of a page.
- Defence in depth: several independent safeguards so that one mistake does not open the door.
- CWE: a catalogue of common weakness types used to classify security bugs.
- CVE: a public identifier for a specific known vulnerability.
- CVSS: a scoring system for the severity of a vulnerability.