Tainted flow: 'req' from os.environ.get (line 129, credential/environment) → urllib.request.urlopen (network output)
Critical
- Category
- Data Flow
- Content
req = urllib.request.Request(url, data=data, headers=headers, method="POST") try: with urllib.request.urlopen(req, timeout=300) as resp: result = json.loads(resp.read().decode("utf-8")) except urllib.error.HTTPError as e: error_body = e.read().decode("utf-8", errors="replace")- Confidence
- 90% confidence
- Finding
- The request URL is derived from GEMINI_BASE_URL, an environment variable, and then used for an authenticated outbound HTTP request carrying the Bearer API key. If an attacker can influence the environment, they can redirect the request to an arbitrary host and capture credentials and prompts, making this a real SSRF/credential-exfiltration risk.
