HighGHSA-wgrm-67xf-hhpqCVE-2024-4367

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

Published 7 May 2024 · Updated 10 Sept 2026

Affected package

Affected
<4.2.67
Fixed in
4.2.67
Update to the fixed version for your release line, for example:npm install pdfjs-dist@4.2.67

Details

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

Is GHSA-wgrm-67xf-hhpq in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected pdfjs-dist, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.