Lab: Exploiting XSS to bypass CSRF defenses
Summary: PortSwigger's lab presents a stored XSS vulnerability in a blog comments function, where the goal is to exploit it to steal a CSRF token and use that token to change the email address of anyone who views the comment. The provided payload makes any viewer of the comment issue a POST request that changes their email address to test@test.com, and testers log in with the credentials wiener:peter.
What's compelling: The attack needs no click and no forged session: a single stored comment turns every reader's browser into the agent that performs the email change, which is typically the first step toward account takeover.
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