Tainted flow: 'image_urls' from requests.post (line 37, network input) → requests.get (network output)
Medium
- Category
- Data Flow
- Content
return {"error": "No image URL returned"} # 下載圖片 img_resp = requests.get(image_urls[0], timeout=60) if img_resp.status_code != 200: return {"error": f"Failed to download image: {img_resp.status_code}"}- Confidence
- 92% confidence
- Finding
- The code blindly fetches a URL returned by the upstream API without validating host, scheme, or content type. If the API is compromised, misconfigured, or proxied via a malicious BASE_URL, this can trigger server-side requests to arbitrary locations and cause the tool to download unexpected or oversized content to disk.
