CVE-2024-28244 | KaTeX's maxExpand bypassed by Unicode sub/superscripts

KaTeX is a JavaScript library for TeX math rendering on the web. KaTeX users who render untrusted mathematical expressions could encounter malicious input using `\def` or `\newcommand` that causes a near-infinite loop, despite setting `maxExpand` to avoid such loops. KaTeX supports an option named maxExpand which aims to prevent infinitely recursive macros from consuming all available memory and/or triggering a stack overflow error. Unfortunately, support for "Unicode (sub|super)script characters" allows an attacker to bypass this limit. Each sub/superscript group instantiated a separate Parser with its own limit on macro executions, without inheriting the current count of macro executions from its parent. This has been corrected in KaTeX v0.16.10.

Published: 2024-03-25 Last update: 2025-09-02 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2024-28244 is rated Low Risk (39.8/100): CVSS Medium severity, with low exploitation likelihood (EPSS 0.18%). Mandatory action: Monitor for updates and reassess as exploit intelligence or EPSS changes.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2024-28244

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-03-04 0.07% 0.18% +0.11%
2 2026-03-01 0.18% 0.07% -0.11%
3 2026-02-04 0.18%

Full EPSS history (31 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2024-28244

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
6.5 3.1 MEDIUM
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
2.8 3.6 [email protected]

Weakness enumeration for CVE-2024-28244

GitHub Security Advisory for CVE-2024-28244

GHSA-cvr6-37gx-v8wc · Severity: medium · Ecosystem: npm — KaTeX's maxExpand bypassed by Unicode sub/superscripts

OS Trackers for CVE-2024-28244

vendor priority summary link
debian not yet assigned CVE-2024-28244 not yet assigned priority: Debian including 1 source packages (node-katex), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 3, open 2. https://security-tracker.debian.org/tracker/CVE-2024-28244
ubuntu medium CVE-2024-28244 medium priority: Ubuntu including 1 source packages (node-katex), 8 status rows across 8 suites (bionic, focal, jammy, mantic, noble, oracular, plucky, upstream): not-affected 6, ignored 1, released 1. https://ubuntu.com/security/CVE-2024-28244

Affected software / configurations for CVE-2024-28244

Vendor Product Version Raw CPE
katex katex >= 0.15.4, < 0.16.10 cpe:2.3:a:katex:katex:*:*:*:*:*:*:*:*

References for CVE-2024-28244

cvelogic Threat Intelligence