Description
If PDF.js is used to load a malicious PDF, and PDF.js is configured with enableScripting set to true (which is the default value) and no CSP for disallowing script-src, unrestricted attacker-controlled JavaScript will be executed in the context of the hosting domain.
Recommendation
Update the pdfjs-dist package to the latest compatible version. Followings are version details:
- Affected version(s): >= 5.6.83, < 6.2.108
- Patched version(s): 6.2.108
References
Related Issues
- PDF.js vulnerable to arbitrary JavaScript execution upon opening a malicious PDF - CVE-2024-4367
- jsPDF has PDF Injection in AcroFormChoiceField that allows Arbitrary JavaScript Execution - CVE-2026-24737
- jsPDF has a PDF Injection in AcroForm module allows Arbitrary JavaScript Execution (RadioButton.createOption and "AS" pr - CVE-2026-25940
- HAX CMS: Stored XSS via '<video-player>' component allows arbitrary JavaScript execution and token theft - CVE-2026-46496
You might also like:
- Tags:
- npm
- pdfjs-dist
Anything's wrong? Let us know Last updated on August 06, 2026


