Tainted flow: 'req' from os.environ.get (line 47, 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
- 91% confidence
- Finding
- The request destination is derived from environment-controlled base URLs, allowing an attacker who can influence the runtime environment to redirect authenticated requests to an arbitrary server. Because the script attaches the API key in the Authorization header, this can leak credentials and shop authorization data to an attacker-controlled endpoint.
