subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
print(f"Executing command: {install_command}") result = subprocess.run( install_command, shell=True, capture_output=True,- Confidence
- 99% confidence
- Finding
- This call executes a shell command built with untrusted input (`model_params`) using `shell=True`, which enables command injection. It also pipes a downloaded remote script directly into `bash`, so an attacker controlling the parameter or the remote script source can achieve arbitrary code execution on the local machine.
