Tainted flow: 'req' from os.environ.get (line 65, 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": "OpenClaw-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
- 91% confidence
- Finding
- The downloader fetches an arbitrary URL returned by the task response and writes the response body directly to disk without validating scheme, host, content type, or size. If an attacker can influence the video URL or task response, this creates an SSRF-style outbound fetch and untrusted file write that could pull internal resources or store unexpected/malicious content locally.
