Tainted flow: 'content' from httpx.post (line 234, network input) → httpx.get (network output)
Medium
- Category
- Data Flow
- Content
# Check if content is a URL if not image_saved and content.startswith("http"): img_response = httpx.get(content, timeout=60) img_response.raise_for_status() image = PILImage.open(BytesIO(img_response.content)) image.save(str(output_path), 'PNG')- Confidence
- 96% confidence
- Finding
- The script takes model-controlled response text from the remote API and, if it begins with "http", performs a second outbound fetch with httpx.get() without validating the destination. A malicious or compromised API/server could return attacker-chosen URLs, causing SSRF-like behavior, unexpected access to internal services or cloud metadata endpoints, and retrieval of untrusted content for image parsing.
