Tainted flow: 'image_url' from requests.post (line 70, network input) → requests.get (network output)
Medium
- Category
- Data Flow
- Content
print(f"Downloading to: {save_path}") # Handle redirect URLs try: img_response = requests.get(image_url, timeout=60, allow_redirects=True) if img_response.status_code == 200: os.makedirs(os.path.dirname(save_path) or ".", exist_ok=True) with open(save_path, "wb") as f:- Confidence
- 93% confidence
- Finding
- The code takes an image URL returned by an external API and immediately fetches it with requests.get, following redirects, without validating the scheme, host, or destination. If the upstream service or workflow output is compromised, this creates an SSRF-style primitive that can be used to make arbitrary outbound requests from the environment, and may also retrieve unexpected large or malicious content.
