Cyber Risks · PortSwigger Research

Lab: CSRF where token is duplicated in cookie

Summary: PortSwigger's lab presents an email change function that is vulnerable to CSRF because it relies on the insecure "double submit" prevention technique, where the token is duplicated in a cookie. The exercise asks the tester to host an HTML page on the exploit server that injects a fake csrf cookie into the victim's browser and submits the form to change the viewer's email address, using the account wiener:peter.

What you should know: Double-submit CSRF defenses assume an attacker cannot set a cookie on the victim's domain, so a single cookie-injection path turns the token check into no check at all - and the consequence here is an attacker-controlled email address on the account.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related