Cross Site Scripting - PDF upload
We recently completed our year‑end penetration testing for the application and identified a medium‑severity issue. The system does not restrict or sanitize PDF uploads that contain embedded JavaScript code. An attacker could upload a specially crafted PDF with embedded JavaScript, and if a privileged user later opens the PDF in a PDF reader, the JavaScript may execute within the reader process.
As a remediation, can we block or reject PDF files that contain embedded JavaScript during upload?