Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. katex
  4. ›
  5. CVE-2024-28243

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

March 25, 2024 (updated February 5, 2026)

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.

References

  • github.com/KaTeX/KaTeX
  • github.com/KaTeX/KaTeX/commit/e88b4c357f978b1bca8edfe3297f0aa309bcbe34
  • github.com/KaTeX/KaTeX/security/advisories/GHSA-64fm-8hw2-v72w
  • github.com/advisories/GHSA-64fm-8hw2-v72w
  • github.com/github/advisory-database/pull/6777
  • nvd.nist.gov/vuln/detail/CVE-2024-28243

Code Behaviors & Features

Detect and mitigate CVE-2024-28243 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 0.12.0 before 0.16.10

Fixed versions

  • 0.16.10

Solution

Upgrade to version 0.16.10 or above.

Impact 6.5 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-606: Unchecked Input for Loop Condition
  • CWE-674: Uncontrolled Recursion

Source file

npm/katex/CVE-2024-28243.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:17 +0000.