Tainted flow: 'request' from os.environ.get (line 67, credential/environment) → urllib.request.urlopen (network output)
Critical
- Category
- Data Flow
- Content
method="POST", ) try: with urllib.request.urlopen(request, timeout=60) as response: result = parse_payload(response.read(), response.headers.get("content-type", "")) return result, response.headers.get("mcp-session-id") or session_id except urllib.error.HTTPError as error:- Confidence
- 95% confidence
- Finding
- The script allows the MCP endpoint URL to be overridden via the AI_HIVE_MCP_URL environment variable and then sends authenticated POST requests to that endpoint using either an API key or bearer token from environment variables. If an attacker can influence the environment, they can redirect requests and exfiltrate credentials to an arbitrary server, making this an SSRF-style credential-leak risk rather than a generic network sink issue.
