cbcvebase.
CVE-2024-4367
published 2024-05-14

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. This vulnerability affects…

PriorityP276high8.8CVSS 3.1
AVNACLPRNUIRSUCHIHAH
EXPLOIT
EPSS
72.65%
99.4th percentile
A type check was missing when handling fonts in PDF.js, which would allow arbitrary JavaScript execution in the PDF.js context. This vulnerability affects Firefox < 126, Firefox ESR < 115.11, and Thunderbird < 115.11.

Affected

44 ranges· showing 25
VendorProductVersion rangeFixed in
debiandebian_linux
debianfirefox< firefox 126.0-1 (sid)firefox 126.0-1 (sid)
debianfirefox-esr< firefox 126.0-1 (sid)firefox 126.0-1 (sid)
debianodoo< firefox 126.0-1 (sid)firefox 126.0-1 (sid)
debianthunderbird< firefox 126.0-1 (sid)firefox 126.0-1 (sid)
github.comgogs_gogs>= 0 < 0.13.3-0.20250608224432-110117b2e5e50.13.3-0.20250608224432-110117b2e5e5
gogs.iogogs>= 0 < 0.13.3-0.20250608224432-110117b2e5e50.13.3-0.20250608224432-110117b2e5e5
mozillafirefox< 115.11.0115.11.0
mozillafirefox< 126.0126.0
mozillafirefox
mozillafirefox>= 0 < 126.0+build2-0ubuntu0.20.04.1126.0+build2-0ubuntu0.20.04.1
mozillafirefox>= 0 < 126.0.1+build1-0ubuntu0.20.04.1126.0.1+build1-0ubuntu0.20.04.1
mozillathunderbird< 115.11.0115.11.0
mozillathunderbird>= 0 < 1:115.11.0-1~deb11u11:115.11.0-1~deb11u1
mozillathunderbird>= 0 < 1:115.11.0-1~deb12u11:115.11.0-1~deb12u1
mozillathunderbird>= 0 < 1:115.11.0-11:115.11.0-1
mozillathunderbird>= 0 < 1:115.11.0-11:115.11.0-1
mozillathunderbird>= 0 < 1:115.11.0+build2-0ubuntu0.20.04.11:115.11.0+build2-0ubuntu0.20.04.1
mozillathunderbird>= 0 < 1:115.11.0+build2-0ubuntu0.22.04.11:115.11.0+build2-0ubuntu0.22.04.1
nextcloudnextcloud< 22.2.10.3322.2.10.33
nextcloudnextcloud>= 23 < 23.0.12.2923.0.12.29
nextcloudnextcloud>= 24 < 24.0.12.2824.0.12.28
nextcloudnextcloud>= 25 < 25.0.13.2325.0.13.23
nextcloudnextcloud>= 26 < 26.0.13.2026.0.13.20
nextcloudnextcloud>= 27 < 27.1.11.2027.1.11.20

Detection & IOCsextracted from sources · hover to see the quote

bytes
/FontMatrix [0.1 0 0 0.1 0 (1\);\n<payload>\n//)]
  • Detect malicious PDF files exploiting CVE-2024-4367 by scanning for a crafted /FontMatrix entry containing JavaScript-like syntax (parentheses-escaped payload) injected into the font matrix array, specifically the pattern `/FontMatrix [0.1 0 0 0.1 0 (1\);` followed by arbitrary code.
  • The exploit abuses a missing type check in PDF.js font handling; monitor web applications using pdfjs-dist for unexpected JavaScript execution originating from PDF rendering contexts (e.g., XSS callbacks with query parameters like `?flag=`).
  • The exploit payload escapes parentheses using backslashes before injection into the FontMatrix field; scan uploaded PDF files for `/FontMatrix` entries containing `\(` and `\)` escaped sequences combined with JavaScript syntax.
  • The crafted malicious PDF uses PDF version header `%PDF-1.4` and embeds the payload within a font object stream; static analysis of uploaded PDFs should flag FontMatrix arrays with non-numeric, code-like content.
  • ·The vulnerability is fixed in Firefox 126, Firefox ESR 115.11, and Thunderbird 115.11; any deployment of pdfjs-dist older than these versions is vulnerable to arbitrary JS execution via crafted FontMatrix entries.
  • ·The root cause is a missing type check when handling fonts in PDF.js; the exploit does not require any special permissions or user interaction beyond opening a crafted PDF in a vulnerable PDF.js context.
  • ·Web applications that accept PDF uploads and render them client-side using a vulnerable pdfjs-dist version are directly exploitable; the exploit can be delivered as a standard PDF file passing MIME type checks (`application/pdf`).

CVSS provenance

nvdv3.18.8HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
ghsa8.8HIGH
osv8.8HIGH
vendor_debian8.8HIGH
vendor_redhat8.8HIGH
vendor_ubuntu8.8HIGH
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.