Tainted flow: 'req' from os.environ.get (line 80, credential/environment) → urllib.request.urlopen (network output)
Critical
- Category
- Data Flow
- Content
req = urllib.request.Request(url, data=data, headers=headers, method=method) try: with urllib.request.urlopen(req, timeout=TIMEOUT) as resp: payload = json.loads(resp.read().decode("utf-8")) except urllib.error.HTTPError as exc: # report status + body only, never the request headers (they hold the key)- Confidence
- 95% confidence
- Finding
- The request destination is derived from the environment-controlled REDDAPI_BASE_URL and the same request may include the Authorization bearer token. If an attacker can influence the process environment, they can redirect requests to an attacker-controlled host and capture the API key, making this an SSRF-style credential exfiltration issue rather than a harmless network call.
