Tainted flow: 'req' from os.environ.get (line 72, credential/environment) → urllib.request.urlopen (network output)
Critical
- Category
- Data Flow
- Content
method="POST", ) try: with urlopen(req, timeout=150) as response: return json.loads(response.read().decode("utf-8")) except HTTPError as e: body = e.read().decode("utf-8") if e.fp else ""- Confidence
- 94% confidence
- Finding
- The request URL and headers are influenced by environment variables, especially LINKFOX_TOOL_GATEWAY, SESSION_ID, MODE_ID, and APP_NAME, and are then sent via urlopen. If an attacker can control the execution environment, they can redirect requests to an attacker-controlled host and exfiltrate the API key in the Authorization header along with request data and metadata. In an agent/skill context, trusting environment-provided endpoints is particularly risky because skills often run with sensitive credentials already injected.
