Tainted flow: 'req' from os.environ.get (line 414, credential/environment) → urllib.request.urlopen (network output)
Critical
- Category
- Data Flow
- Content
url = f"{API_HUB_URL}/spark/token-log?limit=1000" req = urllib.request.Request(url, method="GET") req.add_header("Accept", "application/json") with urllib.request.urlopen(req, timeout=30) as resp: data = json.loads(resp.read().decode()) if data.get("ok"): entries = data.get("entries", [])- Confidence
- 90% confidence
- Finding
- The watcher builds a request URL from the LOCAL_API_HUB_URL environment variable and performs an HTTP request without validating that the destination is limited to a trusted local endpoint. An attacker who can influence the process environment can redirect the watcher to an arbitrary host, causing unintended outbound requests and ingestion of attacker-controlled JSON into the ledger pipeline.
