High severityC#InjectionHIGH confidence
OS Command Injection Tainted Input
Untrusted request input flows into an OS process invocation via Process.Start / ProcessStartInfo, enabling OS command injection (CWE-78/CWE-77).
Standards mapping
Vulnerable vs. safe
Flagged by this check
Process.Start("ping", host);Passes - the safe pattern
Process.Start("ping", "127.0.0.1");Why it matters & how to fix it
Untrusted request input flows into an OS process invocation via Process.Start / ProcessStartInfo, enabling OS command injection (CWE-78/CWE-77). Do not pass user data through a shell (cmd /c, /bin/sh -c). Invoke a fixed executable and supply validated arguments via the ArgumentList collection so each argument is passed literally.
References
Rule ID integsec.csharp.injection.os-command-injection-taint - 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