Tainted flow: 'image_url' from requests.get (line 139, network input) → requests.get (network output)
Medium
- Category
- Data Flow
- Content
images = result_data.get('images', []) if images: image_url = images[0] img_resp = requests.get(image_url, timeout=30) output_path = os.path.join(OUTPUT_DIR, output_name) with open(output_path, 'wb') as f: f.write(img_resp.content)- Confidence
- 92% confidence
- Finding
- The script takes an image URL returned by the external API and immediately fetches it without validating the scheme, host, or expected CDN domain. If the upstream service is compromised or returns attacker-controlled URLs, this can trigger server-side requests to unintended destinations, leak network metadata, or download untrusted content.
