Quick answers
- Is CVE-2024-28244 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2024-28244 being exploited in the wild.
- How severe is CVE-2024-28244?
- Low severity, with a CVSS score of 3.1, published 25 March 2024.
- Which products and versions are affected?
- katex (npm) SEMVER:introduced=0.15.4,fixed=0.16.10.
- Is there a fix for CVE-2024-28244?
- Yes. katex (npm): upgrade to 0.16.10 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2024-28244 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2024-28244?
- Check whether you run katex (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- katex (npm): upgrade to 0.16.10 or later
npm install katex@0.16.10
Technical details
The vulnerability is a resource exhaustion (denial of service) attack that bypasses KaTeX's maxExpand safety mechanism. The root cause is that each Unicode sub/superscript group instantiates a separate Parser instance with its own independent macro execution counter, rather than inheriting and respecting the parent parser's cumulative macro expansion count. An attacker who can inject untrusted mathematical expressions (via \def or \newcommand macros) using Unicode superscript/subscript characters can trigger near-infinite loops despite maxExpand being configured. This results in stack overflow, memory exhaustion, or main-thread blocking. The vulnerability affects KaTeX versions 0.15.4 through 0.16.9 and is fixed in v0.16.10. No special privileges or user interaction are required beyond rendering the malicious input.
Affected products
- KaTeX KaTeX 0.15.4 to 0.16.9
Identifiers
- CVE-2024-28244
- GHSA-cvr6-37gx-v8wc
Timeline
- 2024-03-25: disclosed
- 2024-03-25: patched: KaTeX v0.16.10 released