subprocess module call
Medium
- Category
- Dangerous Code Execution
- Confidence
- 70% confidence
- Finding
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
- Content
python elif stdin is not None and not isinstance(stdin, (bytes, bytearray)): sys.exit("refusing stdin that is not bytes") executable = sys.executable if name == "python" else name return subprocess.run( [executable, *args], shell=False, cwd=cwd,
