# CVE-2024-28243: KaTeX's maxExpand bypassed by \edef

- Severity: Medium 6.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.41%, higher than 73% of CVEs (2026-12-01)
- Published: 2024-03-25T19:38:18.000Z
- Modified: 2026-06-17T07:21:15.070Z
- Also known as: GHSA-64fm-8hw2-v72w
- Weaknesses: CWE-606, CWE-674
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: 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 `\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.

(As written by CVE List.)

## Affected

- KaTeX KaTeX: >= 0.12.0, < 0.16.10; from 0.1.0 before 0.16.10
- katex (npm): from 0.12.0 before 0.16.10

## Every score

- GitHub_M: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/KaTeX/KaTeX/security/advisories/GHSA-64fm-8hw2-v72w> (vendor-advisory, web)
- <https://github.com/github/advisory-database/pull/6777> (web)
- <https://github.com/KaTeX/KaTeX/commit/e88b4c357f978b1bca8edfe3297f0aa309bcbe34> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-28243> (advisory)
- <https://github.com/KaTeX/KaTeX> (package)

## Sources

- CVE List: [CVE-2024-28243](https://www.cve.org/CVERecord?id=CVE-2024-28243), CVE Terms of Use, modified 2026-02-05
- GitHub Advisory Database: [GHSA-64fm-8hw2-v72w](https://github.com/advisories/GHSA-64fm-8hw2-v72w), CC-BY-4.0, modified 2026-02-05
- NVD: [CVE-2024-28243](https://nvd.nist.gov/vuln/detail/CVE-2024-28243), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-28243 · Whole record: https://cve.day/CVE-2024-28243.json · Rebuilt by cve.day 2026-11-25T22:58:37.885Z
