Browser cache poisoning is an attack that makes a web browser store and later reuse malicious or incorrect cached content. It usually exploits weak cache keys, inconsistent handling of headers, or shared caching behaviour so a user receives attacker-influenced responses instead of the intended page or resource.
How Browser Cache Poisoning Works
Browser cache poisoning happens when an attacker causes a browser to save a response that will be reused later for the same URL or cache key. The danger is not only that the first response is wrong, but that later visits can keep serving the attacker-influenced content even after the original request path looks normal again.
This usually depends on a mismatch between what the browser treats as cacheable and what the application actually varies on. Weak cache key design, overlooked query parameters, inconsistent header handling, and shared or proxy-mediated caching can all make two different responses look interchangeable to the cache.
Why Cache Key Confusion Makes It Dangerous
The core problem is integrity. If the browser reuses a poisoned object, users may see altered HTML, scripts, redirects, or assets without making a fresh network request. That can turn a single successful manipulation into repeated exposure across a browsing session.
Browser cache poisoning is especially concerning when the cached response influences page logic, authentication flows, or script loading. A poisoned entry can make a user trust attacker-supplied content because it appears to come from the expected origin and path.
It also matters that cache behaviour is often indirect. A response can be made cacheable by one layer, modified by another, and then reused by the browser under assumptions the developer never intended. That is why the issue often sits at the boundary between application logic, intermediaries, and browser caching rules.
Common Failure Conditions
Several recurring mistakes create the opening for poisoning. Unkeyed inputs are a classic problem, where a response changes based on data the cache does not include in its lookup. Header confusion is another, especially when downstream components interpret or forward headers differently.
Shared caching behaviour can also widen impact. If a browser or intermediary stores a response that should have been private, one user’s poisoned response can survive long enough to affect future visits, reloads, or related page paths.
Defensive assumptions break down fastest when cacheability is inconsistent. A page that should never be cached, or should vary on specific request properties, can become vulnerable if origin and edge rules disagree or if response directives are incomplete.
How Organisations Check Exposure and Reduce Impact
Start by inventorying which pages, static assets, and application routes are cacheable in the browser and at any intermediary layer. Then compare those rules with the parts of the site that accept user-controlled input, reflect request data, or change response content based on headers, cookies, or query parameters.
Review vendor and platform guidance for browser, CDN, and intermediary cache behaviour, especially where browser caching meets reverse proxies or edge delivery. For broader cache and web-layer guidance, the Web Cache Poisoning and Cache Deception Guide is a strong starting point, and the CDN Security Guide helps when edge behaviour influences what browsers receive and store.
Where cache poisoning overlaps with host routing or header trust, the Host Header Attacks and Validation Guide is useful because host confusion can shape cache keys, redirects, and generated links. For browser and web-app defence patterns more generally, the Web Application Attacks Guide provides the wider attack context.
Detection, Recovery, and Post-Compromise Review
Detection usually means looking for inconsistent page content, unexpected redirects, odd scripts, or cache entries that vary in ways the application does not intend. If the symptom disappears on a hard refresh but returns on a normal revisit, that is a strong clue that caching behaviour is involved.
Recovery is often a flush-and-verify exercise. Poisoned browser state, intermediary cache entries, and any related shared cache objects may need to be cleared in a specific order so the bad response is not immediately repopulated.
After containment, review whether the poisoned content could have disclosed data, altered authentication state, or delivered malicious script. The D3-DNSCE DNS Cache Eviction guide is not about browser caches, but it is a helpful operational reference for the discipline of evicting poisoned cache state and proving that the bad data is gone.
Risk and Threat Considerations
Browser cache poisoning matters because it can preserve malicious content after the initial exploit has ended. That gives the attacker persistence at the client side, makes remediation harder for users, and can amplify a one-time web flaw into repeated exposure across later visits.
Failure mechanism: The attacker finds a cache key mismatch, unkeyed input, or header inconsistency that lets a malicious response be stored under a normal-looking request identity, then relies on the browser to reuse it.
Impact: Users may receive altered pages, malicious scripts, misleading redirects, or broken application behaviour, with possible downstream theft of session data, credentials, or transaction integrity.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP ASVS, NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP ASVS | V13 — Configuration | Cache-control and header handling are configuration details that shape response reuse and browser storage. |
| Recommendation — Review cache directives and header handling so only intended responses can be stored and replayed. | ||
| NIST SP 800-53 Rev 5 | SC-4 — Information in Shared Resources | Browser and intermediary caches are shared resources where poisoned content can be reused by later requests. |
| SI-10 — Information Input Validation | Cache poisoning often begins when untrusted input is reflected into cacheable responses or headers. | |
| AU-9 — Protection of Audit Information | Reliable logging helps confirm whether poisoned content was served and when it was evicted. | |
| Recommendation — Restrict shared-cache reuse so one response cannot contaminate later users or sessions. Validate request inputs before they influence cacheable output or cache-key decisions. Preserve trustworthy logs so poisoned-response delivery and cleanup can be reconstructed. | ||
| CIS Controls v8 | CIS-16 — Application Software Security | Browser cache poisoning is a web application behaviour issue that belongs in secure application control review. |
| Recommendation — Test application responses for cache-key confusion and unsafe cacheability before release. | ||
Practitioner Guidance
What to watch for: Treat cacheability as part of the application’s security design, not just a performance setting. If a response can differ based on request metadata, ensure the cache key and cache directives reflect that variation consistently.
Governance implication: Security and web platform teams should define who owns cache rules across origin, CDN, and browser-facing behaviour. Misaligned ownership is a common reason poisoned or stale content survives longer than it should.
Practitioner takeaway: The safest cache is one whose inputs, scope, and invalidation rules are explicit enough that the browser never has to guess what is safe to reuse.
Related resources from NHI Mgmt Group
- What are the signs that a cache poisoning attempt is failing in a browser but working in a proxy tool?
- How should security teams test whether a cache key is safe from poisoning in practice?
- What do teams get wrong about detecting cache poisoning and related cache key flaws?
- What happens when a cache poisoning flaw is chained with a reflected client-side gadget?
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on November 25, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org