Tainted flow: 'image_url' from requests.post (line 105, network input) → requests.get (network output)
Medium
- Category
- Data Flow
- Content
if isinstance(image_url, list): image_url = image_url[0] img_data = requests.get(image_url, timeout=60).content os.makedirs(os.path.dirname(output_path) or ".", exist_ok=True) with open(output_path, "wb") as f: f.write(img_data)- Confidence
- 89% confidence
- Finding
- The script trusts a URL returned by the Replicate API response and fetches it directly with requests.get, without validating scheme, host, or content type. If the upstream service, a compromised response path, or an attacker-influenced model output returns an unexpected URL, this can turn the tool into a server-side request forgery or unwanted internal network fetch primitive.
