Skip to content

Fix SQL Injection Low - #284

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

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

Conversation

@r1kka6

@r1kka6 r1kka6 commented Aug 9, 2026

Copy link
Copy Markdown

Summary

  • reject non-decimal id values before they reach the Low SQL lookup
  • replace raw SQL string concatenation with prepared statements in both MySQL and SQLite branches
  • preserve the normal id=1 lookup while preventing OR 1=1 style multi-row extraction

Verification

  • docker run --rm -v "$PWD":/app dvwa-ctf-xss-reflected-low php -l /app/vulnerabilities/sqli/source/low.php
  • docker build -t dvwa-ctf-sqli-low .
  • baseline MySQL runtime: id=1%27+OR+%271%27%3D%271 returned all five users
  • patched MySQL runtime: id=1 still returned admin, while the injection payload returned no rows

@r1kka6

r1kka6 commented Aug 9, 2026

Copy link
Copy Markdown
Author

Closing as duplicate of #282; switching to a different Low challenge to avoid overlap.

@r1kka6 r1kka6 closed this Aug 9, 2026
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