CVE-2024-34342
Reported by github_m · Published May 7, 2024
react-pdf is fixed in 8.0.2 and 7.7.3 (npm)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| react-pdf | npm | 8.0.2, 7.7.3 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| wojtekmaj | react-pdf | < 7.7.3, >= 8.0.0, < 8.0.2 |
| wojtekmaj | react-pdf | 0, 8.0.0 |
| pdf.js_viewer_project | pdf.js_viewer | < 7.7.3, >= 8.0.0, < 8.0.2 |
| npm | react-pdf | 0, 8.0.0 |
Timeline
- May 7, 2024 CVE Published
- May 8, 2024 EPSS Score (30 in total, the first dated here)
- May 8, 2024 PoC Published (4 in total, the first dated here)
- May 29, 2024 CVE Updated
- Oct 4, 2024 Coalition ESS Score (9 in total, the first dated here)
- Jan 11, 2026 Security Advisory
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-34342
vulnetix vdb fixes CVE-2024-34342
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-34342/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- https://github.com/wojtekmaj/react-pdf/security/advisories/GHSA-87hq-q4gp-9wr4 x_refsource_CONFIRM
- https://github.com/mozilla/pdf.js/security/advisories/GHSA-wgrm-67xf-hhpq x_refsource_MISC
- https://github.com/mozilla/pdf.js/pull/18015 x_refsource_MISC
- https://github.com/mozilla/pdf.js/commit/85e64b5c16c9aaef738f421733c12911a441cec6 x_refsource_MISC
- https://github.com/wojtekmaj/react-pdf/commit/208f28dd47fe38c33ce4bac4205b2b0a0bb207fe x_refsource_MISC
- https://github.com/wojtekmaj/react-pdf/commit/671e6eaa2e373e404040c13cc6b668fe39839cad x_refsource_MISC
- https://nvd.nist.gov/vuln/detail/CVE-2024-34342 advisory
- https://github.com/advisories/GHSA-87hq-q4gp-9wr4 advisory
- https://github.com/wojtekmaj/react-pdf url