Tainted flow: 'download_url' from requests.get (line 96, network input) → requests.get (network output)
Medium
- Category
- Data Flow
- Content
download_url = result["file"]["download_url"] print(f"正在下载音频...") audio_resp = requests.get(download_url, timeout=60) with open(save_path, 'wb') as f: f.write(audio_resp.content)- Confidence
- 90% confidence
- Finding
- The script fetches a download URL returned by a remote API and requests it without validating the scheme, host, or size of the response. If the upstream API is compromised, misconfigured, or attacker-influenced, this can enable server-side request forgery–style outbound requests, unexpected downloads, or disk/memory exhaustion by retrieving arbitrary large content and writing it directly to disk.
