GitHub Advisoryadvisory · npm
GHSA-wgrm-67xf-hhpq PDF.js vulnerable to arbitrary JavaScript execution upon opening a malicious PDF
HIGH
Official page ↗
- Aliases
- CVE-2024-4367
- Ecosystem
- npm
- Packages
- pdfjs-dist
- Severity
- High
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- Weaknesses
- CWE-754
- Reviewed
- 2024-05-07
Affected packages
• npm pdfjs-dist: < 4.2.67 → fixed in 4.2.67
Description
Impact
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.
Patches
The patch removes the use of `eval`:
https://github.com/mozilla/pdf.js/pull/18015
Workarounds
Set the option `isEvalSupported` to `false`.
References
https://bugzilla.mozilla.org/show_bug.cgi?id=1893645
Related
Alias · CVE (1)
- CVE-2024-4367 A type check was missing when handling fonts in PDF.js, which would allow arbitrary JavaScript execution in the PDF.js context. vulnerability
Weakness · CWE (1)
- CWE-754 Improper Check for Unusual or Exceptional Conditions weakness
References
- https://github.com/mozilla/pdf.js/security/advisories/GHSA-wgrm-67xf-hhpq web
- https://nvd.nist.gov/vuln/detail/CVE-2024-4367 advisory
- https://github.com/gogs/gogs/issues/7928 web
- https://github.com/mozilla/pdf.js/pull/18015 web
- https://github.com/mozilla/pdf.js/commit/85e64b5c16c9aaef738f421733c12911a441cec6 web
- https://bugzilla.mozilla.org/show_bug.cgi?id=1893645 web
- https://cert-portal.siemens.com/productcert/html/ssa-827383.html web
- https://codeanlabs.com/blog/research/cve-2024-4367-arbitrary-js-execution-in-pdf-js web
- https://github.com/mozilla/pdf.js package
- https://github.com/mozilla/pdf.js/releases/tag/v4.2.67 web
- https://lists.debian.org/debian-lts-announce/2024/05/msg00010.html web
- https://lists.debian.org/debian-lts-announce/2024/05/msg00012.html web
- https://www.exploit-db.com/exploits/52273 web
- https://www.mozilla.org/security/advisories/mfsa2024-21 web
- https://www.mozilla.org/security/advisories/mfsa2024-22 web
- https://www.mozilla.org/security/advisories/mfsa2024-23 web
- http://seclists.org/fulldisclosure/2024/Aug/30 web