Vulnerability library
Security checkMay 13, 2026

PDF.js vulnerable to arbitrary JavaScript execution upon opening a malicious PDF

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

High severitynpmpdfjs-dist

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

If pdf.js is used to load a malicious PDF, and PDF.js is configured with isEvalSupported set to true (which is the default value), 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): <= 4.1.392
  • Patched version(s): 4.2.67

References

Could your website be exposed too?

SmartScanner can check your website for PDF.js vulnerable to arbitrary JavaScript execution upon opening a malicious PDF and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated May 13, 2026