On 28 October 2026, researchers Kevin Gervot and Adam Kues of Searchlight Cyber published "Cache Me If You Can", research that chains several small, individually unremarkable flaws into a working bypass of Content-Security-Policy on Cloudflare's own /cdn-cgi/image/ endpoint, the image-resizing feature Cloudflare adds to roughly a quarter of the web's domains. The same caching trick also hit Netlify's Image CDN, and the team flagged a related risk in signed URLs on Amazon S3 and Google Cloud Storage.
No single flaw here is dramatic on its own. Put together, they let an attacker run arbitrary JavaScript on a page protected by a strict, correctly written CSP. That is the part worth sitting with if you run a CSP reporting or header scanning tool: a clean policy and a clean report do not always mean a safe page.
How the bypass worked
The chain has four moving parts, and each one alone looks survivable.
The sanitiser escape. Cloudflare cleans uploaded SVGs with svg-hush, built on the xml-rs library. xml-rs escapes ordinary attribute values but leaves namespace URI values unescaped. A crafted SVG with a prefixed root element and an encoded namespace declaration could smuggle a quote character through, breaking out of the attribute and turning into a live script element once sanitisation finished.
The header that should have stopped it. That alone did nothing, because Cloudflare serves a strict CSP, default-src 'none', on this endpoint. The researchers needed to remove the header, not just plant a script.
The caching trick. The image endpoint forwards the origin's Cache-Control header, which supports a little-used no-cache="<header name>" directive telling a cache to strip a named header on replay. Chromium is the only browser that honours this for arbitrary header names, including Content-Security-Policy. Setting Cache-Control: no-cache="Content-Security-Policy" on the source image caused Chromium to later serve the cached response with no CSP header at all, script intact.
Forcing the stale reload. Opening a new window, navigating it elsewhere, then calling history.back() keeps a window.opener reference alive, which blocks Chromium's back/forward cache and forces a reload straight from disk, header strip and all.
Where a site restricted which domains the image endpoint could fetch from, the researchers had one more trick: the fetcher followed redirects without re-checking the final destination, and an open redirect reachable through Cloudflare Access's logout endpoint was enough to smuggle in an attacker-hosted file. They proved the full chain by running script on cloudflare.com itself.
Why CSP alone didn't stop it
This is not a CSP misconfiguration story. Cloudflare's policy here was already strict, default-src 'none'. The full header was default-src 'none'; navigate-to 'none'; form-action 'none'; img-src data:; style-src 'unsafe-inline';, blocking scripts, iframes and forms outright. What failed was an assumption underneath the policy: that the Content-Security-Policy header, once set, stays attached to the response.
A CSP only protects a response while that header is actually delivered with it. If a caching layer can be told, by the origin or by an intermediate service, to drop a named header from a stored copy, the policy is simply not there to enforce anything the next time that copy is served. Sanitising the uploaded content was the right instinct and still was not enough, because the attack moved from the content layer to the header and caching layer, somewhere most CSP reviews do not look.
It is also a reminder that CSP enforcement differs by browser. The no-cache="Content-Security-Policy" trick only works in Chromium-based browsers; Firefox and Safari do not honour it. A policy that looks airtight when tested in one browser can still have gaps in another, which is exactly the kind of thing that only shows up if you are watching CSP violation reports across a real population of visitors, rather than just confirming the header is present in a single test.
What this means for your site
None of this makes CSP pointless. It makes CSP one layer, and this research is a useful checklist for the layers around it.
Treat response headers as part of your trust boundary, not just your page content. If you run an image proxy, resizing service, or anything that forwards headers from an origin or a signed URL, do not pass through Cache-Control, Content-Type, or other control headers from untrusted sources unchecked. Strip or override them explicitly.
Set X-Content-Type-Options: nosniff everywhere you serve user-influenced or third-party content, so a browser cannot be tricked into reinterpreting a file's type the way the Netlify variant of this attack relied on.
Audit what your image and asset fetchers are allowed to reach, and whether they check a redirect's final destination rather than just its first hop. An open redirect on an otherwise trusted subdomain can undo a tight allow-list.
Keep your CSP strict, object-src 'none', a real script-src built on nonces or hashes rather than 'unsafe-inline', but do not treat a passing policy as the end of the job. Keep collecting and actually reviewing your CSP violation reports, across browsers, since a bypass like this one is browser-specific and will not necessarily turn up if you only test in one engine.
Finally, if you run any service that proxies or transforms content on someone else's behalf, assume researchers, and attackers, will look at the seams between your service and theirs. The flaws here were all individually small; the danger was in how they combined.
Key takeaways
"Cache Me If You Can" is a reminder that a security header is a promise the whole delivery chain has to keep, not just something your application sets once. Cloudflare's own CSP was strict and still got bypassed, through a caching behaviour several layers removed from the policy itself. No CVE has been assigned, and neither Cloudflare nor Netlify had published a fix or a disclosure timeline at the time of writing, so check their advisories for updates.
If you are responsible for a site's headers, this is worth an afternoon: check whether anything in your stack forwards Cache-Control or other headers from third-party or user-supplied content, confirm nosniff is set, and look back over your CSP reports from the last few weeks with this bypass pattern in mind. None of it requires waiting for a vendor patch, because the underlying lesson, that header and cache behaviour belongs inside your security review and not just your content sanitisation, holds regardless of what Cloudflare or Netlify ship.