subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
else: cmd = ["wps", filepath] subprocess.Popen(cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) return { 'success': True,- Confidence
- 79% confidence
- Finding
- On Windows, the code invokes `start` via `subprocess.Popen(cmd)` where `start` is a shell built-in rather than a normal executable. This is likely broken unless a shell is involved, and if later changed to use a shell to 'fix' it, it could introduce command-execution risk around attacker-controlled file paths or associations; additionally, opening arbitrary local files can trigger risky registered handlers.
