CVE-2024-34342wojtekmaj react-pdf
High 7.1 No auth needed
Follow: this CVE · wojtekmaj · wojtekmaj react-pdf We alert you by email or Slack (account required).
- Priority
- 58
- CVSS 3.1
- 7.1
- EPSS
- 1.2% probability of exploitation in 30 days · percentile 68
- Auth required
- No
- Published
- May 7, 2024
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-79
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: total
- Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L
What happens
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.
What to do
- Apply the vendor's security update for react-pdf.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | react-pdf |
< 7.7.3 |
7.7.3 |
npm install react-pdf@7.7.3 |
| npm | react-pdf |
≥ 8.0.0 < 8.0.2 |
8.0.2 |
npm install react-pdf@8.0.2 |
Per OSV / GitHub Advisories (GHSA-87hq-q4gp-9wr4). Check the version in your lockfile before upgrading.
Affected products
- wojtekmaj · react-pdf
- pdf.js_viewer_project · pdf.js_viewer
As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.
Official sources
References
Links published by the sources. Open them with care.