CVE-2024-34342
published high CVSS 3.1 · 7.1react-pdf's PDF.js vulnerable to arbitrary JavaScript execution upon opening a malicious PDF
Package status and fixes
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.1 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| wojtekmaj | react-pdf | < 7.7.3 (affected)>= 8.0.0, < 8.0.2 (affected) | GitHub_M · cna |
| pdf.js_viewer_project | pdf.js_viewer | < 7.7.3, >= 8.0.0, < 8.0.2 (affected)Default: unknown | CISA-ADP · adp |
Weaknesses
1- CWE-79 CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
References
6- https://github.com/mozilla/pdf.js/commit/85e64b5c16c9aaef738f421733c12911a441cec6
- https://github.com/mozilla/pdf.js/pull/18015
- https://github.com/mozilla/pdf.js/security/advisories/GHSA-wgrm-67xf-hhpq
- https://github.com/wojtekmaj/react-pdf/commit/208f28dd47fe38c33ce4bac4205b2b0a0bb207fe
- https://github.com/wojtekmaj/react-pdf/commit/671e6eaa2e373e404040c13cc6b668fe39839cad
- https://github.com/wojtekmaj/react-pdf/security/advisories/GHSA-87hq-q4gp-9wr4
Provider assertions
3GitHub_M · cna
react-pdf's PDF.js vulnerable to arbitrary JavaScript execution upon opening a malicious PDF
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 0d97ef63a20ff55d02ddc07201148ab389b9aadc7d02df05602d56afc7218100
- Ingested
- 23 Sep 2026, 08:23:23 UTC
- Source record
- Official CVE record