Web app · OS Command Injection
OS command injection occurs when user-controlled input reaches a function that spawns an operating-system shell, so shell metacharacters such as ; | & $() or backticks let an attacker append or substitute their own commands; calling a shell-interpreting API like system(), exec with shell=true, or backticks on a string built from input executes the injected command with the server process's privileges. It maps to OWASP A03:2021 Injection (CWE-78). A landmark mass-exploited case is GitLab CVE-2021-22205, disclosed April 14, 2021: GitLab passed uploaded images to ExifTool, whose mishandling of malicious DjVu metadata (CVE-2021-22204) allowed command injection. Rescored to CVSS 10.0 once confirmed unauthenticated, it gave remote code execution as the git user and was widely exploited in the wild, including for botnets, cryptomining, and ransomware staging.
Is your project exposed to this? Stateward checks every dependency on every pull request and flags it only if your code actually reaches it.
Check my repoSources: CISA KEV (public domain), OSV.dev & GitHub Advisory Database (CC-BY-4.0), FIRST EPSS, NVD/CWE (public domain). Served live from the Stateward advisory database.