subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
tuple: (returncode, stdout, stderr) """ try: result = subprocess.run( cmd, shell=True, capture_output=True,- Confidence
- 98% confidence
- Finding
- The helper executes arbitrary shell commands with shell=True, and the command string is a free-form parameter. In this file it is used for directory enumeration and process inspection, but the primitive is generic and unsafe: if any part of the command becomes user-influenced or attacker-controlled, it enables command injection and unexpected shell behavior.
