Cross-Site Request Forgery
Forge state-changing requests. Some actions lack tokens; one is protected.
Mission briefing
SecurePanel is a self-service account console for a SaaS product. Users can update email, toggle alerts, and change passwords from the browser. Test whether a malicious site could perform those actions on a logged-in victim's behalf.
Every task in this room is done. Your rank progress just moved forward.
Objectives
- Change email without a CSRF token
- Toggle notifications via a GET request
- Confirm the password form rejects forged posts
Task 1 Email Change (no token) Medium 10 pts
Scenario
SecurePanel lets logged-in users change their email from a simple POST form. The form has no one-time token or referrer check. Change the account email without using the legitimate UI flow.
Your approach
- Log in with the provided demo credentials on the account panel.
- Use dev tools or an intercepting proxy to capture the email change request.
- Replay the POST from curl or a self-made HTML form without session UI.
- Confirm the email updates and the lab displays a success flag.
- Submit the flag shown after the change.
Log in (admin/admin) and change the email without any CSRF token.
Open lab →Hint
POST to /labs/csrf/email with email=...
Task 2 Notifications via GET Medium 10 pts
Scenario
Notification preferences toggle via a GET link with an enabled parameter. Merely visiting the URL flips the setting—no confirmation step. Turn notifications on using a cross-site request.
Your approach
- While logged in, open the notifications page and note the GET URL pattern.
- Craft a request with enabled set to true outside the app UI.
- Optionally host an img tag pointing at that URL on another origin.
- Verify notifications show as enabled and the lab reveals its flag.
- Submit the task flag.
The notifications toggle is driven by a GET parameter.
Open lab →Hint
An <img src> on another site could trigger this.
Task 3 Protected Password Form Medium 10 pts
Scenario
Password changes require a hidden field tied to the user's session. Posts missing that field should fail safely. Confirm the protection works, then record the lab's verification flag.
Your approach
- Inspect the password form for a hidden token field name.
- Send a POST with new password values but omit the token.
- Read the error indicating the token is invalid or missing.
- Note the lab's success message for proving the form is protected.
- Submit the task flag associated with this verification step.
The password form requires a signed CSRF token.
Open lab →Hint
POST without csrf=... should show Invalid or missing CSRF token.