Skip to content

Fix command injection in low security level - #277

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

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

Conversation

@r1kka6

@r1kka6 r1kka6 commented Aug 9, 2026

Copy link
Copy Markdown

Summary

  • validate the low security command injection target as an IPv4 address before invoking ping
  • return the existing invalid-IP error for shell metacharacters and malformed input

Verification

  • docker run --rm -v "$PWD:/work" -w /work php:8.3-cli php -l vulnerabilities/exec/source/low.php
  • source-level probe: 127.0.0.1; printf OWNED returns ERROR: You have entered an invalid IP. while the baseline emits OWNED
  • built dvwa-ctf-command-injection-low and verified the HTTP route rejects the payload but still pings 127.0.0.1

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