{"id":"CVE-2024-34342","state":"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.","publishedAt":"2024-05-07T14:29:06.599Z","updatedAt":"2024-08-02T02:51:10.948Z","severity":{"score":7.1,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L","source":"GitHub_M"},"assigner":"GitHub_M","products":["wojtekmaj react-pdf"],"affected":[{"vendor":"wojtekmaj","product":"react-pdf","versions":[{"version":"< 7.7.3","status":"affected"},{"version":">= 8.0.0, < 8.0.2","status":"affected"}]}],"references":["https://github.com/wojtekmaj/react-pdf/security/advisories/GHSA-87hq-q4gp-9wr4","https://github.com/mozilla/pdf.js/security/advisories/GHSA-wgrm-67xf-hhpq","https://github.com/mozilla/pdf.js/pull/18015","https://github.com/mozilla/pdf.js/commit/85e64b5c16c9aaef738f421733c12911a441cec6","https://github.com/wojtekmaj/react-pdf/commit/208f28dd47fe38c33ce4bac4205b2b0a0bb207fe","https://github.com/wojtekmaj/react-pdf/commit/671e6eaa2e373e404040c13cc6b668fe39839cad"],"weaknesses":["CWE-79"],"ingestedAt":"2026-10-29T20:07:30.303Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/34xxx/CVE-2024-34342.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2024-34342","state":"PUBLISHED","datePublished":"2024-05-07T14:29:06.599Z","dateUpdated":"2024-08-02T02:51:10.948Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2024-05-02T06:36:32.436Z"},"containers":{"cna":{"title":"react-pdf's PDF.js vulnerable to arbitrary JavaScript execution upon opening a malicious PDF","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"wojtekmaj","product":"react-pdf","versions":[{"version":"< 7.7.3","status":"affected"},{"version":">= 8.0.0, < 8.0.2","status":"affected"}]}],"references":[{"url":"https://github.com/wojtekmaj/react-pdf/security/advisories/GHSA-87hq-q4gp-9wr4","name":"https://github.com/wojtekmaj/react-pdf/security/advisories/GHSA-87hq-q4gp-9wr4","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/mozilla/pdf.js/security/advisories/GHSA-wgrm-67xf-hhpq","name":"https://github.com/mozilla/pdf.js/security/advisories/GHSA-wgrm-67xf-hhpq","tags":["x_refsource_MISC"]},{"url":"https://github.com/mozilla/pdf.js/pull/18015","name":"https://github.com/mozilla/pdf.js/pull/18015","tags":["x_refsource_MISC"]},{"url":"https://github.com/mozilla/pdf.js/commit/85e64b5c16c9aaef738f421733c12911a441cec6","name":"https://github.com/mozilla/pdf.js/commit/85e64b5c16c9aaef738f421733c12911a441cec6","tags":["x_refsource_MISC"]},{"url":"https://github.com/wojtekmaj/react-pdf/commit/208f28dd47fe38c33ce4bac4205b2b0a0bb207fe","name":"https://github.com/wojtekmaj/react-pdf/commit/208f28dd47fe38c33ce4bac4205b2b0a0bb207fe","tags":["x_refsource_MISC"]},{"url":"https://github.com/wojtekmaj/react-pdf/commit/671e6eaa2e373e404040c13cc6b668fe39839cad","name":"https://github.com/wojtekmaj/react-pdf/commit/671e6eaa2e373e404040c13cc6b668fe39839cad","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"HIGH","attackVector":"NETWORK","availabilityImpact":"LOW","baseScore":7.1,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-79","lang":"en","description":"CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2024-05-07T14:29:06.599Z"},"source":{"advisory":"GHSA-87hq-q4gp-9wr4","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","affected":[{"vendor":"pdf.js_viewer_project","product":"pdf.js_viewer","defaultStatus":"unknown","versions":[{"version":"< 7.7.3, \t>= 8.0.0, < 8.0.2","status":"affected"}],"cpes":["cpe:2.3:a:pdf.js_viewer_project:pdf.js_viewer:*:*:*:*:*:wordpress:*:*"]}],"metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-34342","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2024-05-07T18:55:02.356516Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-06-04T17:42:26.586Z"}},{"title":"CVE Program Container","references":[{"url":"https://github.com/wojtekmaj/react-pdf/security/advisories/GHSA-87hq-q4gp-9wr4","name":"https://github.com/wojtekmaj/react-pdf/security/advisories/GHSA-87hq-q4gp-9wr4","tags":["x_refsource_CONFIRM","x_transferred"]},{"url":"https://github.com/mozilla/pdf.js/security/advisories/GHSA-wgrm-67xf-hhpq","name":"https://github.com/mozilla/pdf.js/security/advisories/GHSA-wgrm-67xf-hhpq","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://github.com/mozilla/pdf.js/pull/18015","name":"https://github.com/mozilla/pdf.js/pull/18015","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://github.com/mozilla/pdf.js/commit/85e64b5c16c9aaef738f421733c12911a441cec6","name":"https://github.com/mozilla/pdf.js/commit/85e64b5c16c9aaef738f421733c12911a441cec6","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://github.com/wojtekmaj/react-pdf/commit/208f28dd47fe38c33ce4bac4205b2b0a0bb207fe","name":"https://github.com/wojtekmaj/react-pdf/commit/208f28dd47fe38c33ce4bac4205b2b0a0bb207fe","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://github.com/wojtekmaj/react-pdf/commit/671e6eaa2e373e404040c13cc6b668fe39839cad","name":"https://github.com/wojtekmaj/react-pdf/commit/671e6eaa2e373e404040c13cc6b668fe39839cad","tags":["x_refsource_MISC","x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T02:51:10.948Z"}}]}}}