CVE-2024-28243
KaTeX's maxExpand bypassed by \edef
Reported by github_m · Published March 25, 2024
katex is fixed in 0.16.10 (npm)
KaTeX is a JavaScript library for TeX math rendering on the web. KaTeX users who render untrusted mathematical expressions could encounter malicious input using `\edef` that causes a near-infinite loop, despite setting `maxExpand` to avoid such loops. This can be used as an availability attack, where e.g. a client rendering another user's KaTeX input will be unable to use the site due to memory overflow, tying up the main thread, or stack overflow. Upgrade to KaTeX v0.16.10 to remove this vulnerability.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| katex | npm | 0.16.10 |
| katex | katex | 0.16.10 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| KaTeX | KaTeX | >= 0.12.0, < 0.16.10 |
| npm | katex | 0.12.0 |
| KaTeX | KaTeX | 0.12.0 |
Timeline
- Mar 25, 2024 CVE Published
- Mar 26, 2024 EPSS Score (30 in total, the first dated here)
- Oct 4, 2024 Coalition ESS Score (12 in total, the first dated here)
- Jan 14, 2026 Security Advisory
- Jun 17, 2026 CVE Updated
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-28243
vulnetix vdb fixes CVE-2024-28243
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-28243/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- https://github.com/KaTeX/KaTeX/security/advisories/GHSA-64fm-8hw2-v72w x_refsource_CONFIRM
- https://github.com/github/advisory-database/pull/6777 x_refsource_MISC
- https://github.com/KaTeX/KaTeX/commit/e88b4c357f978b1bca8edfe3297f0aa309bcbe34 x_refsource_MISC
- https://nvd.nist.gov/vuln/detail/CVE-2024-28243 advisory
- https://github.com/advisories/GHSA-64fm-8hw2-v72w advisory
- https://github.com/KaTeX/KaTeX url