CVE-2024-34342react-pdf's PDF.js vulnerable to arbitrary JavaScript execution upon opening a malicious PDF
- 7.1HighCVSS base score
- 1.1%Exploitation in 30 daysEPSS · top 35% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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.
Timeline
ID reserved
By GitHub_M
- 5 days later
· 5 days later
Published
- 3 months later
· 3 months later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | High7.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L |
| NVDNVD · Deferred | 3.1 | High7.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L |
- EPSS (exploitation in 30 days)
- 1.1% · top 35% of all CVEs (12 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: total
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 7.1.
Affected products
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- npmreact-pdfGHSA-87hq-q4gp-9wr4 (opens in a new tab)
References
References6
- https://github.com/wojtekmaj/react-pdf/security/advisories/GHSA-87hq-q4gp-9wr4 (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://github.com/mozilla/pdf.js/security/advisories/GHSA-wgrm-67xf-hhpq (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/mozilla/pdf.js/pull/18015 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/mozilla/pdf.js/commit/85e64b5c16c9aaef738f421733c12911a441cec6 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/wojtekmaj/react-pdf/commit/208f28dd47fe38c33ce4bac4205b2b0a0bb207fe (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/wojtekmaj/react-pdf/commit/671e6eaa2e373e404040c13cc6b668fe39839cad (opens in a new tab)x_refsource_MISCx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2024-1513 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-87hq-q4gp-9wr4 (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2024-34342)Record last updated .