Tainted flow: 'pdf_path' from os.environ.get (line 260, credential/environment) → open (file write)
Medium
- Category
- Data Flow
- Content
# Save try: with open(pdf_path, 'wb') as f: f.write(data) return True, str(pdf_path) except Exception as e:- Confidence
- 89% confidence
- Finding
- The PDF cache filename incorporates paper_id with only a simple arXiv: prefix removal and no path sanitization. An attacker-controlled paper_id containing path separators or traversal sequences could cause writes outside the intended cache directory, especially because the resulting Path is opened directly for writing.
