Tainted flow: 'file_url' from requests.post (line 105, network input) → requests.put (network output)
Medium
- Category
- Data Flow
- Content
# 2. PUT 上传文件到 OSS with open(file_path, "rb") as f: put_resp = requests.put(file_url, data=f) if put_resp.status_code not in (200, 201): print(f"文件上传失败, HTTP {put_resp.status_code}", file=sys.stderr) return None- Confidence
- 95% confidence
- Finding
- The script blindly trusts file_url returned by the remote API and uploads the local file to that URL without validating the destination host, scheme, or scope. If the API is compromised, misconfigured, or intercepted, sensitive local documents could be exfiltrated to an attacker-controlled endpoint, making this a significant data exfiltration risk in a document-processing skill.
