High severityPHPInjectionHIGH confidence
Command Injection Backticks
A request parameter is interpolated directly into a shell command string (including PHP backtick execution), enabling OS command injection (CWE-78).
Standards mapping
- CWE
- CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
- OWASP Top 10
- A03:2021 - Injection
- OWASP ASVS
- V5.3.8 (L1)
Vulnerable vs. safe
Flagged by this check
system("ping -c 1 {$_GET['host']}");Passes - the safe pattern
system("ping -c 1 " . $host);Why it matters & how to fix it
A request parameter is interpolated directly into a shell command string (including PHP backtick execution), enabling OS command injection (CWE-78). PHP backticks (`...`) are equivalent to shell_exec and must never contain user input. Build commands from a fixed template and pass arguments through escapeshellarg().
References
Rule ID integsec-php-command-injection-backticks - engine: Opengrep - license: MIT - Copyright (c) IntegSec Inc.
TurboPentest runs this check automatically
Connect a GitHub repo and this check runs on every white-box pentest - AI-validated and reported with proof, from $99 per target.
Start a pentestRelated checks
- JavaScript / TypeScript - InjectionCode Injection Tainted Input
- JavaScript / TypeScript - InjectionEval Dynamic Argument
- JavaScript / TypeScript - InjectionNoSQL Query From Request
- JavaScript / TypeScript - InjectionNoSQL Where Operator
- JavaScript / TypeScript - InjectionOS Command Injection Tainted Input
- JavaScript / TypeScript - InjectionSQL Injection String Concatenation