Skip to content
Fencer Intel
high 7.1

CVE-2024-34342 json

react-pdf's PDF.js vulnerable to arbitrary JavaScript execution upon opening a malicious PDF

published 2y ago modified 4mo ago also EUVD-2024-1513 , GHSA-87hq-q4gp-9wr4

cvss
7.1
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
1.1%
EPSS 1.1% chance of exploitation in 30 days, percentile 65%
public exploits
0
none known

Summary

react-pdf displays PDFs in React apps. 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. This vulnerability is fixed in 7.7.3 and 8.0.2.

Patch / fix

Is CVE-2024-34342 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
total
Assessed
2y ago

Exploit prediction

1.06% chance of exploitation in the next 30 days, higher than 65% of all scored CVEs (FIRST EPSS, 2026-11-11).

CVSS scores

assigned by version score vector
CNA 3.1 7.1 CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L
GitHub 3.1 7.1 CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L

Affected packages

ecosystem package affected fixed in
npm react-pdf
<7.7.3
>=8.0.0, <8.0.2
7.7.3
8.0.2

Affected products

  • wojtekmaj react-pdf
  • pdf.js_viewer_project pdf.js_viewer

Classification

Weakness
  • CWE-79 Improper Neutralization of Input During Web Page Generation
Technology feeds

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

The maintainers of wojtekmaj/react-pdf published their own advisory on GitHub. Reviewed sources take precedence over it.