subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
"--max-time", str(timeout + 5), url ] proc = subprocess.run(head_cmd, capture_output=True, text=True, timeout=timeout + 10) parts = proc.stdout.strip().split("|") status_code = int(parts[0]) if parts[0].isdigit() else 0 final_url = parts[2] if len(parts) > 2 else url- Confidence
- 90% confidence
- Finding
- The script invokes curl on prospect-supplied URLs, which causes outbound network access to arbitrary destinations. Even though subprocess is called with an argument list rather than a shell string, this still creates an SSRF-style risk in the agent context because untrusted input can trigger requests to internal services, cloud metadata endpoints, or attacker-controlled infrastructure.
