subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
elif system == "Linux": subprocess.run(["xdg-open", path], check=True, capture_output=True) elif system == "Windows": subprocess.run(["start", "", path], check=True, shell=True, capture_output=True) except subprocess.CalledProcessError: pass- Confidence
- 95% confidence
- Finding
- The Windows branch uses `subprocess.run(..., shell=True)` with a path value that ultimately depends on downloaded content and helper behavior. On Windows, `shell=True` routes through the command interpreter, so malformed or attacker-influenced filenames can lead to command injection or unintended shell parsing, especially because `start` is a shell built-in with tricky quoting semantics.
