Tainted flow: 'fig_url' from requests.get (line 164, network input) → requests.get (network output)
Medium
- Category
- Data Flow
- Content
if images_dir: # 下载图片到本地 try: img_resp = requests.get(fig_url, timeout=15) img_resp.raise_for_status() ext = fig_url.split("?")[0].rsplit(".", 1)[-1] or "jpg" local_path = images_dir / f"{pid}.{ext}"- Confidence
- 97% confidence
- Finding
- The code fetches fig_url directly from API response data and then performs requests.get(fig_url) without validating the scheme, host, or IP range. If the upstream service is compromised or returns attacker-controlled URLs, this creates an SSRF primitive that can probe internal services, access cloud metadata endpoints, or trigger unintended outbound requests from the host.
