CVE-2024-34342: react-pdf's PDF.js vulnerable to arbitrary JavaScript execution upon opening a malicious PDF
Vulnerability summary
CVE-2024-34342 is a high (CVSS 7.1) vulnerability in wojtekmaj react-pdf. EPSS estimates a 1.06% chance of exploitation in the next 30 days, higher than 65.7% of scored vulnerabilities.
Not severe (CVSS 7.1, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 0 · Related 1Timeline
- 07-05-2024PublishedVulnerability first disclosed.
- 02-08-2024Last modifiedVulnerability information updated.
Description
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.
CVSS metrics
3 scores · 3 sources · 1 version- OSV · NpmEcosystem advisory · calculated7.1HighCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L
- NVDNIST7.1HighCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L
EPSS trend
Probability
1.06%
Chance of exploitation in the next 30 days
Percentile
66%
Versus all other CVEs
30-day change
No change 0.00 pp
From 1.06% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.
Npm1 product
- react-pdf< 7.7.3 | ≥ 8.0.0, < 8.0.2
Wojtekmaj1 product
- react-pdf< 7.7.3 | ≥ 8.0.0, < 8.0.2
2 vendors · 2 products