Tainted flow: 'req' from os.environ.get (line 163, credential/environment) → urllib.request.urlopen (network output)
Critical
- Category
- Data Flow
- Content
body = json.dumps(payload, ensure_ascii=False).encode("utf-8") headers["Content-Type"] = "application/json" req = urllib.request.Request(url, data=body, headers=headers, method=method) with urllib.request.urlopen(req, timeout=timeout_s) as resp: text = resp.read().decode("utf-8") return json.loads(text) if text.strip() else {"ok": True}- Confidence
- 90% confidence
- Finding
- The client builds HTTP_BASE_URL from environment-controlled host and port values and then sends requests to that endpoint with urllib.request.urlopen. If an attacker can influence the environment, they can redirect the client to an unintended server, causing SSRF-like behavior against local or internal services and potentially sending document paths, parse options, or shutdown requests to an attacker-controlled listener.
