Lab: Targeted web cache poisoning using an unknown header
Summary: PortSwigger's lab demonstrates targeted web cache poisoning, in which a response is poisoned so it executes alert(document.cookie) in a visitor's browser, and the poisoned response must be served only to the specific subset of users the intended victim belongs to. Solving it requires identifying the vulnerability, studying cache behavior, and finding a way to target the right user subset before poisoning the cache, using a header such as X-Host and a posted comment containing a payload that makes the victim's browser contact the exploit server.
What's compelling: A cache that can be poisoned for one user subset serves malicious script to exactly the people an attacker chooses, and the lab's use of an unknown header shows the targeting can ride on request details defenders may not think to inspect.
Read the original at PortSwigger Research ↗
- Topics
- Vulnerabilities & Patching
- Related
- Attackers Exploit UnrealIRCd Flaw That Enables Server-Level Command Injection Cyber Risks · Nov 14, 2026U.S. CISA adds Check Point and UnrealIRCd flaws to its Known Exploited Vulnerabilities catalog Cyber Risks · Nov 14, 2026PostgreSQL Patches 52 Flaws, Including 22-Year-Old Bug Enabling Authenticated RCE Cyber Risks · Nov 13, 2026