{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-28244","id":"CVE-2024-28244","title":"KaTeX's maxExpand bypassed by Unicode sub/superscripts","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/o","descriptionLong":"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.","published":"2024-03-25T19:45:50.907Z","updated":"2026-10-28T02:30:26.211345284Z","reserved":"2024-03-07T14:33:30.036Z","status":"Analyzed","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"GitHub_M"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"github.com"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"OSV"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"GitHub"}],"rating":"medium","products":["KaTeX"],"affectedProducts":[{"vendor":"KaTeX","product":"KaTeX","defaultStatus":null,"versions":[{"version":">= 0.15.4, < 0.16.10","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"katex","purl":"pkg:npm/katex","ranges":[">=0.15.4 <0.16.10"],"fixed":["0.16.10"],"advisory":"GHSA-cvr6-37gx-v8wc"}],"cwes":["CWE-674","CWE-606"],"aliases":["GHSA-cvr6-37gx-v8wc"],"references":[{"url":"https://github.com/KaTeX/KaTeX/security/advisories/GHSA-cvr6-37gx-v8wc","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/KaTeX/KaTeX/commit/085e21b5da05414efefa932570e7201a7c70e5b2","tags":["x_refsource_MISC","x_transferred","Patch","fix","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/28xxx/CVE-2024-28244.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-28244","tags":["advisory"]},{"url":"https://github.com/KaTeX/KaTeX","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.02155,"epssPercentile":0.82555,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-28244","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-28244","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-28244","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-cvr6-37gx-v8wc","ok":true,"note":"GHSA-cvr6-37gx-v8wc"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-28244","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}