Description
The PDF viewer does not sufficiently sanitize PostScript calculator functions, allowing malicious JavaScript to be injected through a crafted PDF file. This JavaScript can then be run with the permissions of the PDF viewer by its worker. This vulnerability affects Firefox ESR < 52.8, Firefox < 60 and PDF.js < 2.0.550.
Recommendation
Update the pdfjs-dist package to the latest compatible version. Followings are version details:
Affected version(s): **< 1.10.100 >= 2.0.0, < 2.0.550** Patched version(s): **1.10.100 2.0.550**
References
Could your website be exposed too?
SmartScanner can check your website for Malicious PDF can inject JavaScript into PDF Viewer and gives you actionable findings to investigate.
Start a free scanRelated Issues
- PDF.js vulnerable to arbitrary JavaScript execution upon opening a malicious PDF - CVE-2024-4367
- PDF.js: Arbitrary JavaScript execution upon opening a malicious PDF - CVE-2026-16633
- Macro in MathJax running untrusted Javascript within a web browser - CVE-2018-1999024
- jsonata: Malicious inputs to "$toMillis" function can cause resource exhaustion - CVE-2026-52746


