subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
'--format', 'json' ] match_result = subprocess.run(match_cmd, capture_output=True, text=True, timeout=30) match_data = json.loads(match_result.stdout) finally:- Confidence
- 91% confidence
- Finding
- The code executes an external helper and blindly trusts its stdout as JSON without checking the return code, validating the payload shape, or constraining the execution environment. If the helper script, interpreter resolution, or local execution context is tampered with, the parent process can consume attacker-controlled output and make security-relevant decisions such as match classification and downstream database actions.
