# CVE-2024-34342: react-pdf's PDF.js vulnerable to arbitrary JavaScript execution upon opening a malicious PDF

- Severity: High 7.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.06%, higher than 65% of CVEs (2026-12-02)
- Published: 2024-05-07T14:29:06.599Z
- Modified: 2026-06-17T07:33:12.770Z
- Also known as: GHSA-87hq-q4gp-9wr4
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- wojtekmaj react-pdf: < 7.7.3; >= 8.0.0, < 8.0.2
- pdf.js_viewer_project pdf.js_viewer: < 7.7.3, 	>= 8.0.0, < 8.0.2
- react-pdf (npm): before 7.7.3; from 8.0.0 before 8.0.2

## Every score

- GitHub_M: CVSS:3.1 7.1 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L`
- GitHub: CVSS:3.1 7.1 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L`

## References

- <https://github.com/wojtekmaj/react-pdf/security/advisories/GHSA-87hq-q4gp-9wr4> (web)
- <https://github.com/mozilla/pdf.js/security/advisories/GHSA-wgrm-67xf-hhpq> (web)
- <https://github.com/mozilla/pdf.js/pull/18015> (web)
- <https://github.com/mozilla/pdf.js/commit/85e64b5c16c9aaef738f421733c12911a441cec6> (web)
- <https://github.com/wojtekmaj/react-pdf/commit/208f28dd47fe38c33ce4bac4205b2b0a0bb207fe> (web)
- <https://github.com/wojtekmaj/react-pdf/commit/671e6eaa2e373e404040c13cc6b668fe39839cad> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-34342> (advisory)
- <https://github.com/wojtekmaj/react-pdf> (package)

## Sources

- CVE List: [CVE-2024-34342](https://www.cve.org/CVERecord?id=CVE-2024-34342), CVE Terms of Use, modified 2024-08-02
- GitHub Advisory Database: [GHSA-87hq-q4gp-9wr4](https://github.com/advisories/GHSA-87hq-q4gp-9wr4), CC-BY-4.0, modified 2026-02-04
- NVD: [CVE-2024-34342](https://nvd.nist.gov/vuln/detail/CVE-2024-34342), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-34342 · Whole record: https://cve.day/CVE-2024-34342.json · Rebuilt by cve.day 2026-11-25T22:58:40.040Z
