Tainted flow: 'req' from os.getenv (line 687, credential/environment) → urllib.request.urlopen (network output)
Critical
- Category
- Data Flow
- Content
"""Download a file from *url* to *dest*, creating parent dirs as needed.""" dest.parent.mkdir(parents=True, exist_ok=True) req = urllib.request.Request(url, headers={"User-Agent": "qwencloud-ai/1.0"}) with urllib.request.urlopen(req, timeout=timeout) as resp: dest.write_bytes(resp.read()) return dest- Confidence
- 88% confidence
- Finding
- download_file fetches an arbitrary URL and writes the response directly to disk with no host validation, size limit, content-type checks, or user confirmation. In a skill whose stated purpose is text/chat, this broad remote download primitive materially increases risk of SSRF-like access to internal resources, retrieval of sensitive URLs, and unsafe persistence of attacker-controlled content.
