subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
dict: {"success": bool, "stdout": str, "stderr": str, "exit_code": int} """ try: result = subprocess.run( ["python3", "-c", code], capture_output=True, text=True,- Confidence
- 98% confidence
- Finding
- This code executes arbitrary Python supplied through the `code` parameter via `python3 -c`. That creates a direct code-execution primitive, allowing an attacker or untrusted caller to run system commands, access secrets, modify files, or pivot further within the host environment.
