Tainted flow: 'req' from os.environ.get (line 31, credential/environment) → urllib.request.urlopen (network output)
Critical
- Category
- Data Flow
- Content
headers = {"Content-Type": "application/json", "X-Proxy-Token": PROXY_TOKEN} req = urllib.request.Request(PROXY_URL, data=payload, headers=headers, method="POST") try: with urllib.request.urlopen(req, timeout=timeout) as resp: return json.loads(resp.read().decode("utf-8")) except (socket.timeout, TimeoutError): return {"ok": False, "error": "timeout"}- Confidence
- 96% confidence
- Finding
- The code sends user-supplied query parameters and an authentication token to a remote proxy endpoint whose URL is controlled by an environment variable and defaults to an external Tencent SCF address. This creates a real exfiltration and SSRF-style trust-boundary issue: if PROXY_URL is changed or the remote proxy is compromised, user queries and the proxy token are disclosed to an attacker-controlled service.
