{"id":"CVE-2024-34342","aliases":["CLSA-2026-1775781167","EUVD-2024-1513","GHSA-87hq-q4gp-9wr4","ROOT-APP-NPM-CVE-2024-34342"],"status":"published","title":"react-pdf's PDF.js vulnerable to arbitrary JavaScript execution upon opening a malicious PDF","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.","severity":{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.01064,"percentile":0.64897,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79"],"published":"2024-05-07T14:29:06Z","modified":"2026-10-28T02:31:06Z","fixes":[{"ecosystem":"npm","package":"react-pdf","fixed_in":["7.7.3","8.0.2"],"sources":["ghsa","osv"]},{"ecosystem":"TuxCare:npm","package":"react-pdf","fixed_in":["7.7.1-tuxcare.1"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"@rootio/react-pdf","fixed_in":["5.7.2-root.io.1","5.7.2-root.io.2","5.7.2-root.io.3"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"react-pdf","fixed_in":["5.7.2-aikido.2","5.7.2-aikido.3"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"react-pdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"7.7.3"}]}]},{"source":"ghsa","ecosystem":"npm","package":"react-pdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"8.0.0"},{"fixed":"8.0.2"}]}]},{"source":"osv","ecosystem":"TuxCare:npm","package":"react-pdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"7.7.1-tuxcare.0"},{"fixed":"7.7.1-tuxcare.1"}]}],"versions":["7.7.1"]},{"source":"osv","ecosystem":"npm","package":"react-pdf","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"7.7.3"}]}]},{"source":"osv","ecosystem":"npm","package":"react-pdf","ranges":[{"type":"SEMVER","events":[{"introduced":"8.0.0"},{"fixed":"8.0.2"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"@rootio/react-pdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.7.2-root.io.1"},{"fixed":"5.7.2-root.io.2"},{"fixed":"5.7.2-root.io.3"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"react-pdf","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"5.7.2-aikido.2"},{"fixed":"5.7.2-aikido.3"}]}]}],"products":[{"vendor":"pdf.js_viewer_project","product":"pdf.js_viewer"},{"vendor":"wojtekmaj","product":"react-pdf"}],"references":[{"url":"https://github.com/wojtekmaj/react-pdf/security/advisories/GHSA-87hq-q4gp-9wr4","tags":["x_refsource_CONFIRM","x_transferred","advisory","web"]},{"url":"https://github.com/mozilla/pdf.js/security/advisories/GHSA-wgrm-67xf-hhpq","tags":["x_refsource_MISC","x_transferred","advisory","web"]},{"url":"https://github.com/mozilla/pdf.js/pull/18015","tags":["x_refsource_MISC","x_transferred","fix","web"]},{"url":"https://github.com/mozilla/pdf.js/commit/85e64b5c16c9aaef738f421733c12911a441cec6","tags":["x_refsource_MISC","x_transferred","fix","web"]},{"url":"https://github.com/wojtekmaj/react-pdf/commit/208f28dd47fe38c33ce4bac4205b2b0a0bb207fe","tags":["x_refsource_MISC","x_transferred","fix","web"]},{"url":"https://github.com/wojtekmaj/react-pdf/commit/671e6eaa2e373e404040c13cc6b668fe39839cad","tags":["x_refsource_MISC","x_transferred","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-34342","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-87hq-q4gp-9wr4"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/34xxx/CVE-2024-34342.json","tags":["advisory"]},{"url":"https://github.com/wojtekmaj/react-pdf","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2024-34342","title":"react-pdf's PDF.js vulnerable to arbitrary JavaScript execution upon opening a malicious PDF","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.","status":"published","published":"2024-05-07T14:29:06.599Z","modified":"2024-08-02T02:51:10.948Z","cvss":[{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L","level":"high","assessor":"cna"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:34:23.193864Z"}],"euvd":[{"id":"EUVD-2024-1513","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.","status":"published","published":"2024-05-07T14:29:06Z","modified":"2024-08-02T02:51:10Z","cvss":[{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L","level":"high"}],"updated_at":"2026-11-03T03:50:21.347751Z"}],"ghsa":[{"id":"GHSA-87hq-q4gp-9wr4","title":"react-pdf vulnerable to arbitrary JavaScript execution upon opening a malicious PDF with PDF.js","description":"### Summary\n\nIf 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.\n\n### Patches\n[This patch](https://github.com/wojtekmaj/react-pdf/commit/671e6eaa2e373e404040c13cc6b668fe39839cad) forces `isEvalSupported` to `false`, removing the attack vector.\n\n### Workarounds\nSet `options.isEvalSupported` to `false`, where `options` is `Document` component prop.\n\n### References\n- [GHSA-wgrm-67xf-hhpq](https://github.com/mozilla/pdf.js/security/advisories/GHSA-wgrm-67xf-hhpq)\n- https://github.com/mozilla/pdf.js/pull/18015\n- https://github.com/mozilla/pdf.js/commit/85e64b5c16c9aaef738f421733c12911a441cec6\n- https://bugzilla.mozilla.org/show_bug.cgi?id=1893645","status":"published","published":"2024-05-07T16:48:59Z","modified":"2024-05-08T10:10:23Z","cvss":[{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L","level":"high"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:37:48.08826Z"}],"nvd":[{"id":"CVE-2024-34342","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.","status":"published","published":"2024-05-07T15:15:09.73Z","modified":"2026-06-17T07:33:12.77Z","cvss":[{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L","level":"high","assessor":"secondary"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:09:57.497105Z"}],"osv":[{"id":"CVE-2024-34342","title":"react-pdf's PDF.js vulnerable to arbitrary JavaScript execution upon opening a malicious PDF","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.","status":"published","published":"2024-05-07T14:29:06.599Z","modified":"2026-10-28T02:31:06.828299192Z","cvss":[{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L","level":"high"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:44:40.391953Z"},{"id":"GHSA-87hq-q4gp-9wr4","title":"react-pdf vulnerable to arbitrary JavaScript execution upon opening a malicious PDF with PDF.js","description":"### Summary\n\nIf 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.\n\n### Patches\n[This patch](https://github.com/wojtekmaj/react-pdf/commit/671e6eaa2e373e404040c13cc6b668fe39839cad) forces `isEvalSupported` to `false`, removing the attack vector.\n\n### Workarounds\nSet `options.isEvalSupported` to `false`, where `options` is `Document` component prop.\n\n### References\n- [GHSA-wgrm-67xf-hhpq](https://github.com/mozilla/pdf.js/security/advisories/GHSA-wgrm-67xf-hhpq)\n- https://github.com/mozilla/pdf.js/pull/18015\n- https://github.com/mozilla/pdf.js/commit/85e64b5c16c9aaef738f421733c12911a441cec6\n- https://bugzilla.mozilla.org/show_bug.cgi?id=1893645","status":"published","published":"2024-05-07T16:48:59Z","modified":"2026-02-04T02:26:44.613595Z","cvss":[{"version":"3.1","score":7.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L","level":"high"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:42.077781Z"},{"id":"CLSA-2026-1775781167","title":"TuxCare security update for react-pdf (1 CVE)","description":"TuxCare rebuilt react-pdf to address 1 CVE. Fixed in 7.7.1-tuxcare.1.","status":"published","published":"2026-08-04T14:52:23Z","modified":"2026-10-15T09:46:37.702690002Z","updated_at":"2026-11-02T15:43:44.009773Z"},{"id":"ROOT-APP-NPM-CVE-2024-34342","title":"CVE-2024-34342 in @rootio/react-pdf - Patched by Root","description":"Root has patched CVE-2024-34342 in the @rootio/react-pdf package for Root:npm. Multiple fixed versions available.","status":"published","published":"2026-06-09T12:42:17Z","modified":"2026-06-09T19:30:08.920025886Z","updated_at":"2026-11-02T15:53:27.362922Z"}]}}
