Skip to content

Fix stored XSS in low security level - #281

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

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

Conversation

@r1kka6

@r1kka6 r1kka6 commented Aug 9, 2026

Copy link
Copy Markdown

Summary

  • encode guestbook name and message fields before storing them
  • preserve the existing low-level database escaping while preventing stored script execution

Verification

  • docker run --rm -v "$PWD":/work -w /work php:8.3-cli php -l vulnerabilities/xss_s/source/low.php
  • vulnerable baseline renders <script>alert(1)</script> and <script>alert(2)</script> back into the guestbook HTML
  • patched runtime renders the same payloads as &lt;script&gt;...&lt;/script&gt;

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