{"id":"CVE-2024-28243","published":"2024-03-25T19:40:00Z","modified":"2026-02-05T15:26:36Z","title":"KaTeX's maxExpand bypassed by \\edef","vendor":"KaTeX","product":"KaTeX","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01414,"percentile":0.73401,"provenance":"source"},"cwes":[{"id":"CWE-674","name":"Uncontrolled Recursion"}],"references":[{"url":"https://github.com/KaTeX/KaTeX/security/advisories/GHSA-64fm-8hw2-v72w","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/github/advisory-database/pull/6777","tags":["x_refsource_MISC"]},{"url":"https://github.com/KaTeX/KaTeX/commit/e88b4c357f978b1bca8edfe3297f0aa309bcbe34","tags":["x_refsource_MISC"]}],"priority":{"score":19.2,"factors":[{"name":"EPSS percentile","points":14.68},{"name":"CVSS severity","points":4.55}]},"vendorSlug":"katex","affectedVersions":[{"vendor":"KaTeX","product":"KaTeX","versions":[">= 0.12.0, < 0.16.10"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-04-01T19:45:30.747278Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"katex","vulnerableRanges":[">=0.12.0, <0.16.10"],"patched":["0.16.10"],"from":["GHSA-64fm-8hw2-v72w"],"provenance":"source"}],"summary":{"text":"KaTeX, a JavaScript library for rendering TeX math on the web, has a flaw where the maxExpand safeguard can be bypassed by using \\edef in an expression, causing a near-infinite loop during rendering. An attacker with network access and low privileges can supply untrusted math input to a site that renders it, with no user interaction required, causing denial of service through memory exhaustion, main-thread blocking, or stack overflow in the rendering client.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:33:35Z"},"euvd":{"id":"EUVD-2024-0839","exploited":false,"provenance":"source"}}