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
- 90% confidence
- Finding
- The script builds authenticated HTTP requests to an MCP endpoint whose URL is taken from the AI_HIVE_MCP_URL environment variable. A malicious or compromised environment can redirect requests, causing API keys or bearer tokens from environment variables to be sent to an attacker-controlled server and enabling arbitrary remote tool invocation under those credentials.
