CVE-2026-48065: Python Shell Command Injection

Executing OS commands with dynamic string formatting via os.system or subprocess with shell=True is vulnerable to command injection. An attacker who controls the interpolated input can break out of the command string to execute arbitrary code. Use subprocess functions without shell=True and pass arguments as an array/list.

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0Python
greprules fetch cve-2026-48065-python-shell-command-injection --engine opengrep

Description

Executing OS commands with dynamic string formatting via os.system or subprocess with shell=True is vulnerable to command injection. An attacker who controls the interpolated input can break out of the command string to execute arbitrary code. Use subprocess functions without shell=True and pass arguments as an array/list.