Skip to content

TaintedShell

User-controlled input reaches a shell execution sink without escaping, creating a command injection risk.

<?php
system('convert ' . $_POST['file']); // injection risk

Use escapeshellarg() on any user-supplied values before passing them to shell functions.

<?php
system('convert ' . escapeshellarg($_POST['file']));