Hacking

Web Cache Poisoning 2026: Worse Than Ever

Published  ·  4 min read

Web cache poisoning never really went away, but in 2026 it has become far more dangerous and far easier to execute than most security teams realize.

The core trick is still the same: trick a shared cache (CDN, reverse proxy, load balancer, or even the browser) into storing a malicious response for an innocent-looking URL, so every subsequent visitor receives the poisoned payload instead of the real content.

What changed in 2025–2026 is the combination of:
1. more permissive cache keying defaults in modern CDNs
2. widespread adoption of HTTP/2 & HTTP/3 (which introduce new header smuggling vectors)
3. edge-side JavaScript execution (Cloudflare Workers, Fastly Compute, Vercel Edge Functions)
4. increased use of Cache-Control: private + stale-while-revalidate patterns that create longer poisoning windows

The Classic Attack (Still Works, Still Brutal)
Normal request: GET /blog/article?id=123 HTTP/1.1 Host: example.com X-Forwarded-Host: evil.com
When X-Forwarded-Host (many CDNs include this as a default) is used to fill in the cache key the cache will store the response under/Blog/article?id=123 however it is actually serving evil.com’s malicious content (XSS, fraud page, crypto-drainer script) to all the users requesting the legitimate URL.

In 2026 this is still catastrophic because:
1. Most sites do not strip/ignore dangerous forwarded headers
2. Cache TTLs are often 1–24 hours (or longer with stale-while-revalidate)
3. One poisoned entry can hit millions of users

The New 2026 Variants That Are Actually Hurting Companies
1. HTTP/2 & HTTP/3 Header Smuggling Attackers send multiple Host or X-Forwarded-Host headers in a single HTTP/2 or HTTP/3 request. Backend and cache interpret them differently → cache stores poisoned response under the legitimate Host.

(February 2026): An e-commerce site in the Middle East experienced HTTP/3 smuggling caused by an attacker that manipulated the checkout page and directed users to a fictitious payment form. For 14 hours after the incident occurred, users were redirected to the attacker’s site before the attack was discovered and significant losses resulted from several significant transactions as a result.

2. SaaS dashboard poisoned by cache key manipulation via Cache-Control directives. Modern CDNs follow the Cache-Control directives of private, no-cache and also support the stale-while-revalidate directive, which allows an attacker to poison the cache of a page or resource with a long-lived stale-while-revalidate window. Legitimate users will continue to receive stale, poisoned content until the resource is corrected at the origin.

3. (June 2025): A fintech startup had its Vercel Edge's functions poisoned by an attacker. As a result, user session tokens were exfiltrated and there was not a rollback for 9 hours after the attack occurred.

4. An attacker poisoned a resource that causes an installed malicious Service Worker on the user's browser, which results in the browser caching the malicious Service Worker so that it will continue to provide poisoned content after the resource is corrected at the origin.

Why It’s Worse Than Ever Right Now
1. CDN providers have recently changed their policies towards caching based on their Vary Header and others in response to an increase in performance related issues.
2. The rapid integration of HTTP/3 has enabled the proliferation of many different smuggling vectors that are not adequately mitigated.
3. The massive growth of edge computing means that even one malicious edge worker can have a detrimental impact across the entire network.
4. Regardless of the original intention of having a stale-while-revalidate by CDN providers, they have now become the de facto standard for most CDN providers.
5. Many enterprises continue to use CDN configurations and cache keys that are minimally restrictive, if at all.

Best Practices For Protection
1. Only use Vary Headers If they correspond with specific header values (i.e., Vary: Accept-Encoding, Vary: Accept-Language), Always use Vary Headers for both Accept-Encoding & Accept-Language.
2. Never use Vary Header for headers controlled by users, for example X-Forwarded-*, Forwarded, etc.
3. Never cache 4xx or 5xx status responses. The only exception would be to hold them in cache for a few seconds.
4. Disable stale-while-revalidate functionality on any sensitive requests, such as login, checkout, or dashboard.
5. Implementing strict cache key filtering; specifically, with Cloudflare, use the "Cache Key Excludes" for dangerous headers.
6. Implementing validation for all user-controllable header inputs when processing requests at the edge with Workers / Edge Functions.
7. Monitor for and identify sudden changes in traffic to specific URLs using unexpected User-Agents, or Referrers as the mechanism by which to perform those observations.
8. Enable real-time cache purge on any security incident, purge everything

Web cache poisoning in 2026 isn’t just a “web vuln” anymore, it’s a supply-chain and reputation killer. One poisoned URL can serve malware, phishing pages, or defacement to your entire audience for hours or days.
Check your CDN cache rules today, especially Vary, stale-while-revalidate, and header inclusion. The defaults are often wide open.

Professional Services

Explore Our Cybersecurity Services

Our insights are backed by hands-on service delivery. If your business needs professional cybersecurity support, our UK-based specialists are ready to help.

© 2016 – 2026 Red Secure Tech Ltd. Registered in England and Wales — Company No: 15581067