{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-34342","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.","descriptionLong":"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.","published":"2024-05-07T14:29:06.599Z","updated":"2026-10-28T02:31:06.828299192Z","reserved":"2024-05-02T06:36:32.436Z","status":"Deferred","rejected":false,"assigner":"GitHub_M","metric":{"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","rating":"high","source":"GitHub_M"},"metrics":[{"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","rating":"high","source":"GitHub_M"},{"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","rating":"high","source":"github.com"},{"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","rating":"high","source":"OSV"},{"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","rating":"high","source":"GitHub"}],"rating":"high","products":["wojtekmaj react-pdf"],"affectedProducts":[{"vendor":"wojtekmaj","product":"react-pdf","defaultStatus":null,"versions":[{"version":"< 7.7.3","status":"affected"},{"version":">= 8.0.0, < 8.0.2","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"react-pdf","purl":"pkg:npm/react-pdf","ranges":["<7.7.3",">=8.0.0 <8.0.2"],"fixed":["7.7.3","8.0.2"],"advisory":"GHSA-87hq-q4gp-9wr4"}],"cwes":["CWE-79"],"aliases":["GHSA-87hq-q4gp-9wr4"],"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://github.com/CVEProject/cvelistV5/tree/main/cves/2024/34xxx/CVE-2024-34342.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-34342","tags":["advisory"]},{"url":"https://github.com/wojtekmaj/react-pdf","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total"},"epss":0.01064,"epssPercentile":0.65314,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-34342","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-34342","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-34342","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-87hq-q4gp-9wr4","ok":true,"note":"GHSA-87hq-q4gp-9wr4"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-34342","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":["react"],"critical":[],"attention":null}