<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Portswigger - Web Cache Poisoning on Offensive security blog</title><link>https://squ4r00t.github.io/series/portswigger---web-cache-poisoning/</link><description>Recent content in Portswigger - Web Cache Poisoning on Offensive security blog</description><generator>Hugo</generator><language>en</language><copyright>&lt;a href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank" rel="noopener">CC BY-NC 4.0&lt;/a></copyright><lastBuildDate>Sun, 22 Feb 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://squ4r00t.github.io/series/portswigger---web-cache-poisoning/index.xml" rel="self" type="application/rss+xml"/><item><title>Portswigger - Cache Poisoning with an Unknown Header</title><link>https://squ4r00t.github.io/writeups/cp_unknown_header/</link><pubDate>Sun, 22 Feb 2026 00:00:00 +0000</pubDate><guid>https://squ4r00t.github.io/writeups/cp_unknown_header/</guid><description>&lt;h2 id="lab-description">Lab Description&lt;/h2>
&lt;p>This lab is vulnerable to web cache poisoning. A victim user will view any comments that you post. To solve this lab, you need to poison the cache with a response that executes &lt;code>alert(document.cookie)&lt;/code> in the visitor&amp;rsquo;s browser. However, you also need to make sure that the response is served to the specific subset of users to which the intended victim belongs.&lt;/p>
&lt;h2 id="solve">Solve&lt;/h2>
&lt;p>Looking for unkeyed input with param miner, we find the &lt;code>X-Host&lt;/code> header:&lt;/p></description></item><item><title>Portswigger - Combining web cache poisoning vulnerabilities</title><link>https://squ4r00t.github.io/writeups/cp_combining_vulns/</link><pubDate>Sun, 22 Feb 2026 00:00:00 +0000</pubDate><guid>https://squ4r00t.github.io/writeups/cp_combining_vulns/</guid><description>&lt;h2 id="lab-description">Lab Description&lt;/h2>
&lt;p>This lab is susceptible to web cache poisoning, but only if you construct a complex exploit chain.&lt;/p>
&lt;p>A user visits the home page roughly once a minute and their language is set to English. To solve this lab, poison the cache with a response that executes &lt;code>alert(document.cookie)&lt;/code> in the visitor&amp;rsquo;s browser.&lt;/p>
&lt;h2 id="solve">Solve&lt;/h2></description></item><item><title>Portswigger - Cache Poisoning with an Unkeyed Cookie</title><link>https://squ4r00t.github.io/writeups/cp_unkeyed_cookie/</link><pubDate>Sat, 21 Feb 2026 00:00:00 +0000</pubDate><guid>https://squ4r00t.github.io/writeups/cp_unkeyed_cookie/</guid><description>&lt;h2 id="lab-description">Lab Description&lt;/h2>
&lt;p>This lab is vulnerable to web cache poisoning because cookies aren&amp;rsquo;t included in the cache key. An unsuspecting user regularly visits the site&amp;rsquo;s home page. To solve this lab, poison the cache with a response that executes &lt;code>alert(1)&lt;/code> in the visitor&amp;rsquo;s browser.&lt;/p>
&lt;p>Access &lt;a href="https://portswigger.net/web-security/web-cache-poisoning/exploiting-design-flaws/lab-web-cache-poisoning-with-an-unkeyed-cookie">here&lt;/a>&lt;/p>
&lt;h2 id="solve">Solve&lt;/h2>
&lt;p>Intercepting the request to the homepage, we find a cookie &lt;code>fehost=prod-cache-01&lt;/code> which is reflected in the response inside a javascript object:&lt;/p>
&lt;figure>&lt;img src="https://squ4r00t.github.io/img/portswigger/cp_unkeyed_cookie/cookie-reflected.png"
 alt="fehost cookie reflected">&lt;figcaption>
 &lt;p>&lt;code>fehost&lt;/code> cookie reflected&lt;/p></description></item><item><title>Portswigger - Cache Poisoning with multiple headers</title><link>https://squ4r00t.github.io/writeups/cp_multiple_headers/</link><pubDate>Sat, 21 Feb 2026 00:00:00 +0000</pubDate><guid>https://squ4r00t.github.io/writeups/cp_multiple_headers/</guid><description>&lt;h2 id="lab-description">Lab Description&lt;/h2>
&lt;p>This lab contains a web cache poisoning vulnerability that is only exploitable when you use multiple headers to craft a malicious request. A user visits the home page roughly once a minute. To solve this lab, poison the cache with a response that executes &lt;code>alert(document.cookie)&lt;/code> in the visitor&amp;rsquo;s browser.&lt;/p>
&lt;blockquote>
&lt;p>[!TIP]- Hint
This lab supports both the &lt;code>X-Forwarded-Host&lt;/code> and &lt;code>X-Forwarded-Scheme&lt;/code> headers.&lt;/p>&lt;/blockquote>
&lt;p>Access &lt;a href="https://portswigger.net/web-security/web-cache-poisoning/exploiting-design-flaws/lab-web-cache-poisoning-with-multiple-headers">here&lt;/a>&lt;/p>
&lt;h2 id="solve">Solve&lt;/h2>
&lt;p>Using &lt;a href="">param miner&lt;/a> to guess headers, we find that &lt;code>X-Forwarded-Scheme&lt;/code> is an unkeyed headers:&lt;/p></description></item><item><title>Portswigger - Cache Poisoning with an Unkeyed Header</title><link>https://squ4r00t.github.io/writeups/cp_unkeyed_header/</link><pubDate>Fri, 20 Feb 2026 00:00:00 +0000</pubDate><guid>https://squ4r00t.github.io/writeups/cp_unkeyed_header/</guid><description>&lt;h2 id="lab-description">Lab Description&lt;/h2>
&lt;p>This lab is vulnerable to web cache poisoning because it handles input from an unkeyed header in an unsafe way. An unsuspecting user regularly visits the site&amp;rsquo;s home page. To solve this lab, poison the cache with a response that executes &lt;code>alert(document.cookie)&lt;/code> in the visitor&amp;rsquo;s browser.&lt;/p>
&lt;blockquote>
&lt;p>[!TIP]- Hint
This lab supports the &lt;code>X-Forwarded-Host&lt;/code> header.&lt;/p>&lt;/blockquote>
&lt;p>Access &lt;a href="https://portswigger.net/web-security/web-cache-poisoning/exploiting-design-flaws/lab-web-cache-poisoning-with-an-unkeyed-header">here&lt;/a>&lt;/p>
&lt;h2 id="finding-unkeyed-inputs">Finding Unkeyed Inputs&lt;/h2>
&lt;p>The first step is to find unkeyed headers. For this we can use the &lt;a href="">param miner&lt;/a> extension in Burp Suite. After running the extension to find unkeyed headers on the home page, we see that &lt;code>X-Forwarded-Host&lt;/code> is an unkeyed header:&lt;/p></description></item><item><title>Portswigger - Cache Poisoning to DOM XSS</title><link>https://squ4r00t.github.io/writeups/cp_dom_xss/</link><pubDate>Sat, 06 Dec 2025 00:00:00 +0000</pubDate><guid>https://squ4r00t.github.io/writeups/cp_dom_xss/</guid><description>&lt;h2 id="lab-description">Lab Description&lt;/h2>
&lt;p>This lab contains a DOM-based vulnerability that can be exploited as part of a web cache poisoning attack. A user visits the home page roughly once a minute. Note that the cache used by this lab has stricter criteria for deciding which responses are cacheable, so you will need to study the cache behavior closely.&lt;/p>
&lt;p>To solve the lab, poison the cache with a response that executes &lt;code>alert(document.cookie)&lt;/code> in the visitor&amp;rsquo;s browser.&lt;/p></description></item></channel></rss>