Skip to content

Secure low JavaScript token validation - #293

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

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

Conversation

@r1kka6

@r1kka6 r1kka6 commented Aug 10, 2026

Copy link
Copy Markdown

Summary

  • replace the deterministic client-derived Low token with a cryptographically random session-bound token
  • validate Low submissions server-side with hash_equals() and rotate the token after each attempt to stop replay
  • remove the client-side MD5 / ROT13 generator so the browser no longer computes a forgeable token

Verification

  • php -l passed for vulnerabilities/javascript/index.php and vulnerabilities/javascript/source/low.php
  • vulnerable baseline accepts the public token 38581812b435834ebf84ebcc2c6424d6 for phrase=success
  • patched runtime accepts one issued 64-hex token once, rejects replay of the same token, and rejects the old deterministic token

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