Tainted flow: 'host' from requests.get (line 77, network input) → requests.post (network output)
Medium
- Category
- Data Flow
- Content
"Content-Type": mime_type, } files = {"file": (file_name, f, mime_type)} resp = requests.post(host, data=form_data, files=files) if resp.status_code not in (200, 204): raise Exception(f"上传失败: HTTP {resp.status_code}")- Confidence
- 91% confidence
- Finding
- The script takes an upload destination host directly from a prior API response and then sends the local image file to that host without validating the domain, scheme, or trust boundary. If the token service is compromised, misconfigured, or intercepted, this becomes an SSRF/exfiltration primitive that can redirect file uploads to an attacker-controlled endpoint.
