NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · npm

CVE-2024-4367: PDF.js vulnerable to arbitrary JavaScript execution upon opening a malicious PDF

highCVSS 3.1 8.8GHSA-wgrm-67xf-hhpq

Impact 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. Patches The patch removes the use of eval: https://github.com/mozilla/pdf.js/pull/18015 Workarounds Set the option isEvalSupported to false.

Published May 7, 2024 · Updated May 13, 2026

Affected packages

pdfjs-dist

Ecosystem
npm
Affected
<= 4.1.392
Fixed in
4.2.67
Check
npm ls pdfjs-dist

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

Impact

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.

Patches

The patch removes the use of eval: https://github.com/mozilla/pdf.js/pull/18015

Workarounds

Set the option isEvalSupported to false.

References

https://bugzilla.mozilla.org/show_bug.cgi?id=1893645

Credited to ThomasRinsma.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More npm vulnerabilities

All npm entries