Lab: CSRF where token validation depends on request method
Summary: PortSwigger's lab presents an email-change function that is vulnerable to CSRF because its defenses are applied only to certain request types. The lab asks the solver to host an HTML page on the exploit server that changes the viewer's email address, using the account wiener:peter and a different email address for the final exploit than the one used during testing.
What's compelling: The control exists but covers only some request methods, so an attacker who sends the request a different way reaches the same email-change function with no token check - and taking over the account starts with controlling where its password resets go.
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