Advisory

GHSA-wgrm-67xf-hhpq

Also known as: CVE-2024-4367

Summary

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

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

Severity

High Basis: The source's own band: HIGH

Dates

Published
2024-05-07 10:25 UTC
Modified
2026-09-10 03:50 UTC

Affected packages and fixes

pdfjs-dist

npm · All systems

Affected

  • introduced 0, fixed 4.2.67 (semver)

Fixed versions

4.2.67

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences