subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
for cmd in commands: try: proc = subprocess.run( cmd, shell=True, capture_output=True, text=True, timeout=120, cwd=os.path.dirname(contract_path) or os.getcwd() )- Confidence
- 98% confidence
- Finding
- The verifier executes contract-supplied strings via subprocess.run(..., shell=True), which allows arbitrary shell command execution if verify_commands are attacker-controlled or influenced by untrusted input. In this skill, contracts can be created from JSON input and later verified automatically, so this is not just an internal helper but a command-execution primitive.
