Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Web Cache Attacks?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/anandjogawade-web-cache-attacks)
---
name: web-cache-attacks
description: "Web cache poisoning and deception — unkeyed inputs poison shared cache entries (headers, fat GET, parameter cloaking, cache-key injection/normalization, CPDoS) or trick the cache into storing victims' private responses. Safe cache-buster-first confirmation. Tier 1. Payloads: payloads/crlf-http.md. Use behind a CDN/reverse cache (Varnish, Cloudflare, Akamai, Nginx proxy_cache)."
---
# Web Cache Poisoning & Deception
**Poisoning:** an unkeyed input changes a cached response, then that response is served to everyone on the keyed URL. **Deception:** trick the cache into storing a victim's dynamic/private response and serve it to you.
## Trigger phrases
`web cache poisoning, cache deception, unkeyed header, fat get, parameter cloaking, cpdos, x-forwarded-host, cache key`
## Method (poisoning — safe-first)
1. **Detect caching:** `Age`, `X-Cache: hit/miss`, `CF-Cache-Status`, `Cache-Control`/`max-age`. `no-cache` doesn't mean "don't test".
2. **Always add a unique cache-buster** (`?zazybuster=<rand>`) so your poisoned entry is keyed to a URL only you request — this keeps real users safe.
3. **Hunt unkeyed inputs** with Param Miner ("Guess headers/cookies") using a canary: `X-Forwarded-Host`, `X-Host`, `X-Forwarded-Scheme`/`-Proto`, `X-Forwarded-Server`, `X-Original-URL`, `X-Rewrite-URL`, `X-Forwarded-For`. Find one that changes the response but isn't in the key.
4. **Confirm persistence:** resend *without* the malicious header on the same busted URL; a clean browser fetch returns the injected content → confirmed (still scoped to your buster).
## Poisoning techniques
- **Unkeyed header → sink:** `X-Forwarded-Host` reflected into `og:image`/`<script src>`/cookie domain; `X-Host` → attacker `<script src>`; `X-Forwarded-Scheme: http`+`X-Forwarded-Host` → 301 to attacker; `X-Original-URL`/`X-Rewrite-URL` → swap cached page.
- **Fat GET:** GET carrying a body; some caches forward it unkeyed — `GET /?param=x` + body `param=evil`. (Remediation: reject GET bodies.)
- [NEW] **Parameter cloaking:** cache strips one param from the key but origin parses it: Varnish `/search?q=help?_=1&!&search=1`; **Rails `;`** `/jsonp?callback=legit&utm_content=x;callback=alert(1)//` → JSONP XSS.
- **Unkeyed query / path-variant keys:** `GET //?"><script>alert(1)</script>` (reflects into `og:url`); force distinct keys hitting the same endpoint via `//` (Apache), `/%2F` (Nginx), `/index.php/xyz` (PHP), `/(A(xyz))/` (.NET).
- [NEW] **Cache-key injection:** unescaped delimiter joins key parts → two requests collide (Akamai `Origin: '-alert(1)-'__`, Cloudflare `::`); inspect `X-True-Cache-Key` debug.
- [NEW] **Normalization discrepancy:** Nginx keys decoded but forwards undecoded → `/%3fproduct=` shares key with `/?product=`; encoded-XSS variant serves XSS from cache.
- [NEW] **CPDoS / Cache-What-Where:** oversized/malformed header origin-400s but cache stores it; host-port redirect DoS (`Host: site.com:1337` reflected in `Location`, port unkeyed); redirect-length 414 DoS; chain a self-only reflected bug into site-wide when cached under `/main.js` with `public, max-age`.
## Method (deception — safe-first)
1. Baseline a **non-cacheable** private response (`Cache-Control: private/no-store`) = R0; append a random suffix (expect == R0 if ignored).
2. Insert a candidate delimiter that **ends the path at origin but not the cache**: `;` (Spring matrix), `.` (Rails format), `%00` (OpenLiteSpeed), encoded newline, `#`, `?`. Test raw + URL-encoded.
3. Request `/<dynamic-path><delimiter>.css|.js` or a cached dir (`/static`,`/assets`) with a cache-buster.
4. **Confirm with two of your own accounts in a test env only:** craft as account A, fetch unauthenticated/as B, check `X-Cache: hit` captured A's data → purge the entry after.
## Bypass / evasion
${CLAUDE_PLUGIN_ROOT}/payloads/waf-bypass.md: encoded delimiters, backslash on IIS, double-encoding for normalization gaps, Param Miner's auto cache-buster, path-variant keys above.
## Escalation / chaining
Reflected header → cached stored XSS → `dom-xss`/`html-injection`; redirect poisoning → token theft. Deception captures tokens/API keys → `access-control`/account takeover. Pairs with `http-request-smuggling` (response-queue poisoning), `host-header-injection`, `crlf-injection`, `cors`.
## Backend & tooling
Preferred Kali path (native / WSL+Kali / Kali-SSH / Kali-MCP / HexStrike): Burp **Param Miner**, `curl` with explicit busters, headless browser to verify victim-side delivery. If a Burp MCP is present, drive Param Miner and confirm via Repeater. Windows-local last resort. See `zazy-orchestrator`.
## Verification (background, before reporting)
Re-confirm independently (clean-browser fetch of the busted URL, or second account for deception) and reproduce before marking CONFIRMED. Keep every PoC scoped to a cache-buster/own-accounts so real users are never served poisoned content. Purge test entries. Report true positives only.
## Evidence
The unkeyed input + sink (or the deception delimiter), request/response showing the cached malicious/private content with `X-Cache`/`Age`, the cache-buster used, affected URL, impact. Remediation: don't derive responses from unkeyed headers/cookies, `Vary` or add inputs to the key, one parser for key+app, `Cache-Control: no-store, private` on dynamic/authenticated responses, reject GET bodies, unify CDN/origin URL parsing.