Tainted flow: 'img_url' from requests.post (line 56, network input) → requests.get (network output)
Medium
- Category
- Data Flow
- Content
print(f"URL: {img_url}") # 下载图片 img_response = requests.get(img_url) if img_response.status_code == 200: # 保存到当前目录 timestamp = int(time.time())- Confidence
- 89% confidence
- Finding
- The code blindly fetches a URL returned by the external API without validating its scheme, host, or content type. If the upstream service is compromised or returns an unexpected URL, this can enable server-side request forgery behavior, unexpected outbound requests, or downloading untrusted content to local storage.
