Tainted flow: 'download_url' from requests.get (line 124, 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
- 92% confidence
- Finding
- The code fetches a download URL obtained from a remote API response and then performs a second request to that URL without validating the scheme, host, or destination. If the upstream response is malicious, compromised, or manipulated, this can enable server-side request forgery behavior or downloading attacker-controlled content, which is then written directly to disk.
