CVE-2024-22423: Python Incomplete Windows Cmd Escaping

Detected an incomplete escaping mechanism for Windows cmd.exe. Replacing double quotes with '""' or constructing an invocation like `/c "{args}"` using an f-string is vulnerable to command injection. Double quotes do not prevent the expansion of environment variables like `%VAR%` under cmd.exe, allowing attackers to execute arbitrary shell commands. Ensure `

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0Python
greprules fetch cve-2024-22423-python-incomplete-windows-cmd-escaping --engine opengrep

Description

Detected an incomplete escaping mechanism for Windows cmd.exe. Replacing double quotes with '""' or constructing an invocation like `/c "{args}"` using an f-string is vulnerable to command injection. Double quotes do not prevent the expansion of environment variables like `%VAR%` under cmd.exe, allowing attackers to execute arbitrary shell commands. Ensure `