Tainted flow: 'req' from os.environ.get (line 566, credential/environment) → urllib.request.urlopen (network output)
- Category
- Data Flow
- Confidence
- 93% confidence
- Finding
The notification URL is taken from the PORTAL_NOTIFY_URL environment variable and used directly in urllib.request.urlopen() without validation or allowlisting. An attacker who can influence the runtime environment can redirect these POSTs to an arbitrary host, causing SSRF and exfiltration of tenant/account/platform metadata from a privileged internal process.
- Content
python headers={"Content-Type": "application/json"}, method="POST", ) with urllib.request.urlopen(req, timeout=5) as resp: if resp.status == 200: logger.info(f"[cookie_keepalive] cookie_expired通知推送成功: {platform}/{effective_tenant}") else:
