CVE-2024-48911: Python Subprocess Relative Executable

Executing a subprocess with a relative path (e.g., 'cp', 'iptables') rather than an absolute path makes the application vulnerable to Untrusted Search Path (CWE-426) attacks. If the application is run from a directory controlled by an attacker, or if the PATH environment variable is manipulated, an attacker can execute arbitrary binaries, potentially leading

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0Python
greprules fetch cve-2024-48911-python-subprocess-relative-executable --engine opengrep

Description

Executing a subprocess with a relative path (e.g., 'cp', 'iptables') rather than an absolute path makes the application vulnerable to Untrusted Search Path (CWE-426) attacks. If the application is run from a directory controlled by an attacker, or if the PATH environment variable is manipulated, an attacker can execute arbitrary binaries, potentially leading