Tainted flow: 'upload_url' from requests.post (line 95, network input) → requests.post (network output)
Medium
- Category
- Data Flow
- Content
upload_url = 'https:' + upload_args['action'] if upload_args['action'].startswith('//') else upload_args['action'] upload_fields = {item['name']: item['value'] for item in upload_args['fields']} with open(args.image_file, 'rb') as f: upload_resp = requests.post(upload_url, data=upload_fields, files={'file': f}, timeout=60) upload_resp.raise_for_status() # Step 1: create a self post- Confidence
- 89% confidence
- Finding
- The script takes upload_url directly from the previous API response and performs a second POST to that URL without validating the destination host. If a malicious or compromised upstream response, proxy, or TLS-intercepting environment altered the action field, the script could upload arbitrary local files specified by --image-file to an attacker-controlled endpoint.
