The Cache That Trusted a Fake Extension
A 2017 PayPal disclosure shows why shared caches must honor freshness headers instead of guessing from a path suffix


AI-generated illustration.
AI disclosure: This article was drafted with AI assistance as an analytical case study of a public disclosure. It is not my own discovery.
Shared caches are supposed to remember public assets, not account pages. Omer Gil reported that PayPal could be induced to store personalized account HTML under a public-looking cache key when a path suffix resembled a static file. PayPal fixed the issue and paid $3,000, per the researcher.
Disclaimer: Educational and defensive use only. Patched in 2017. This article intentionally omits reproduction details.
Vulnerability Overview
Type: Web cache deception (origin routing and cache keying disagreed about the same URL)
CWE (analytical mapping, not from the source): CWE-436, CWE-524
CVE: Not stated in the disclosure
Severity/CVSS: Not reported. Bounty: $3,000 (source-reported)
What Happened (high level)
Two independently reasonable behaviors collided. Many application frameworks treat extra segments after a document route as irrelevant and still render that document. Separately, operators often configure an edge cache or CDN to store objects that “look static” from the path, sometimes ignoring the origin’s own cache-control guidance for those lookups. When both are true, a personalized HTML response can be written into a shared cache under a key that later visitors can request without authenticating.
Gil framed this as a class of misalignment between origin routing and cache classification. PayPal was the public case he was permitted to name.
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, and 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.
Remediation & Defense-in-Depth (my own analysis)
Defense 1 — 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 private or no-store directives.
Defense 2 — 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.
Defense 3 — 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 personalized document under the longer URL.
# Pseudocode: decide AFTER the origin responds; never override no-store
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)
Defense 4 — Split the asset host. Serve stylesheets, scripts and images from a cookie-less hostname that never renders account HTML.
Defense 5 — 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.
Key Takeaways
A file-looking suffix is not a content type, and it is not permission to cache.
Personalized HTML must never land in a shared cache, even if the path looks harmless.
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.
Credit & Sources
Research by Omer Gil: Web Cache Deception Attack (27 February 2017). Facts come from that post; analysis, code and remediation are original suggestions.
First published by Adam Hale on Medium.
Sources
Share
Reactions
Comments
Your name and comment appear on this article for other readers.
Corrections and tips:[email protected]

