subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
"-H", f"Host: {host}", url ] r = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True, timeout=30) if log_mode: return r.stdout if r.returncode == 0 else None- Confidence
- 90% confidence
- Finding
- The script builds a curl command using environment-derived values, including a URL/host based on REGION and cluster metadata, then performs authenticated requests with cloud credentials. Although shell injection is avoided, this still creates an SSRF-like outbound request primitive to attacker-influenced endpoints and disables TLS verification with -k, increasing interception and redirection risk.
