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
- 87% confidence
- Finding
- The download_file helper fetches any provided URL and writes the response directly to disk with no scheme, host, size, or content validation. If higher-level code passes attacker-controlled URLs, this creates SSRF-style outbound fetch capability and arbitrary file write of remote content into chosen local paths, which is broader than the skill's stated image-generation purpose.
