Skip to content

Arbitrary JavaScript execution upon opening a malicious PDF

High
calixteman published GHSA-wgrm-67xf-hhpq May 6, 2024

Package

npm pdfjs-dist (npm)

Affected versions

<= 4.1.392

Patched versions

4.2.67

Description

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:
#18015

Workarounds

Set the option isEvalSupported to false.

References

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

Severity

High

CVE ID

CVE-2024-4367

Weaknesses

No CWEs

Credits