Skip to content

Add CSRF protection to low security password changes - #279

Open
r1kka6 wants to merge 1 commit into
OWASP-CTF:dc34-ctffrom
r1kka6:fix/csrf-low
Open

r1kka6 wants to merge 1 commit into
OWASP-CTF:dc34-ctffrom
r1kka6:fix/csrf-low

Conversation

@r1kka6

@r1kka6 r1kka6 commented Aug 9, 2026

Copy link
Copy Markdown

Summary

  • require a valid anti-CSRF token before low-level password changes
  • render the token field on the low-level CSRF form so legitimate requests still work

Verification

  • docker run --rm -v "$PWD:/work" -w /work php:8.3-cli php -l vulnerabilities/csrf/source/low.php
  • docker run --rm -v "$PWD:/work" -w /work php:8.3-cli php -l vulnerabilities/csrf/index.php
  • built dvwa-ctf-csrf-low and verified an authenticated request without user_token gets a 302 redirect and leaves the password unchanged
  • verified the same password change succeeds when the rendered token is supplied

Signed-off-by: r1kka6 <219588946+r1kka6@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant