CVE-2024-28244
published medium CVSS 3.1 · 6.5KaTeX's maxExpand bypassed by Unicode sub/superscripts
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| KaTeX | — | KaTeX>= 0.15.4, < 0.16.10 | Affected | Not stated | GitHub_M |
Description
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 6.5 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| KaTeX | KaTeX | >= 0.15.4, < 0.16.10 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-674 CWE-674: Uncontrolled Recursion
References
2Provider assertions
3GitHub_M · cna
KaTeX's maxExpand bypassed by Unicode sub/superscripts
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- e056c3c18a5dac5a7c66d5f7ebf0857825052fa358b885c0c08f20289006082d
- Ingested
- 23 Sep 2026, 08:21:01 UTC
- Source record
- Official CVE record