Tainted flow: 'req' from os.environ.get (line 94, credential/environment) → urllib.request.urlopen (network output)
Critical
- Category
- Data Flow
- Content
os.makedirs(os.path.dirname(out_path) or ".", exist_ok=True) req = urllib.request.Request(url, headers={"User-Agent": "AIsa-Media-Gen/1.0"}) try: with urllib.request.urlopen(req, timeout=timeout_s) as resp, open(out_path, "wb") as f: total = 0 while True: chunk = resp.read(1024 * 1024) # 1MB- Confidence
- 88% confidence
- Finding
- The helper downloads arbitrary URLs returned by the remote service and writes the response body directly to disk without validating scheme, host, content type, or size. If an attacker can influence the returned URL, this becomes a server-side request forgery style fetch and arbitrary file download primitive that could reach internal services or consume disk/network resources.
