Tainted flow: 'download_url' from requests.get (line 120, network input) → requests.get (network output)
Medium
- Category
- Data Flow
- Content
print(f"正在下载视频到 {output_path}...") with open(output_path, "wb") as f: video_response = requests.get(download_url) video_response.raise_for_status() f.write(video_response.content) print(f"视频已成功保存至 {output_path}")- Confidence
- 94% confidence
- Finding
- The code retrieves a download URL from a remote API response and then performs an unrestricted second GET to that URL without validating the hostname, scheme, or expected domain. If the upstream service is compromised, misconfigured, or returns an unexpected URL, the script could be coerced into making arbitrary outbound requests, enabling SSRF-like behavior or downloading malicious content to disk.
