Tainted flow: 'req' from os.getenv (line 551, credential/environment) → urllib.request.urlopen (network output)
Critical
- Category
- Data Flow
- Content
headers={"Content-Type": "application/json"}, method="POST", ) with urllib.request.urlopen(req, timeout=60) as r: return json.loads(r.read().decode())["message"]["content"].strip() except Exception as exc:- Confidence
- 98% confidence
- Finding
- The Ollama endpoint is built from the OLLAMA_HOST environment variable and then used for an outbound HTTP request without validation. In this guardrail context, that allows environment-controlled SSRF-style egress of sensitive prompts and payload data to an attacker-chosen host, which is especially risky because the request includes user intent and action data.
