Skip to content
Fencer Vulns
high 7.1

CVE-2024-34342 json

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

published 2024-05-07 2 y ago modified 2026-06-17 4 mo 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 64%
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

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
total
Assessed
2 y ago

Exploit prediction

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

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 Vulns 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.