Tainted flow: 'audio_url' from requests.post (line 216, network input) → requests.get (network output)
Medium
- Category
- Data Flow
- Content
if resp.get('data', {}).get('audio'): audio_url = resp['data']['audio'] print(f'[DOWNLOADING] {audio_url}') ar = requests.get(audio_url, timeout=60) with open(output_file, 'wb') as f: f.write(ar.content) size_kb = len(ar.content) // 1024- Confidence
- 86% confidence
- Finding
- The script blindly trusts the audio URL returned by the remote API and performs a second request to that URL without validating the scheme, hostname, or content type. If the upstream service is compromised or malicious, this can be abused for server-side request forgery behavior, unexpected downloads, or writing attacker-controlled content to disk.
