Tainted flow: 'image_url' from requests.post (line 47, network input) → requests.get (network output)
Medium
- Category
- Data Flow
- Content
image_url = data["data"][0]["url"] # Download image img_response = requests.get(image_url) img = Image.open(BytesIO(img_response.content)) if filename is None:- Confidence
- 83% confidence
- Finding
- The code performs a second network request to a URL returned by the first API response without validating the host, scheme, or content type. If that upstream response were compromised or unexpectedly manipulated, the script could fetch arbitrary remote content, creating an SSRF-like outbound fetch pattern and exposing the process to malicious payloads or resource abuse before parsing the image.
