Vulnerability library
Security checkMay 28, 2024

Malicious PDF can inject JavaScript into PDF Viewer

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

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 scan

Related Issues

See something that needs correcting? Let us knowUpdated May 28, 2024