Live threats

All CVEs / Katex

CVE-2025-23207Katex

High 7.2 No auth needed

Priority
58
CVSS 3.1
7.2
EPSS
—
Auth required
No
Published
Jan 17, 2025
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-116, CWE-79
SSVC (CISA)
Exploitation: none · Automatable: no · Technical impact: partial
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N

What happens

KaTeX is a fast, easy-to-use JavaScript library for TeX math rendering on the web. KaTeX users who render untrusted mathematical expressions with `renderToString` could encounter malicious input using `\htmlData` that runs arbitrary JavaScript, or generate invalid HTML. Users are advised to upgrade to KaTeX v0.16.21 to remove this vulnerability. Users unable to upgrade should avoid use of or turn off the `trust` option, or set it to forbid `\htmlData` commands, forbid inputs containing the substring `"\\htmlData"` and sanitize HTML output from KaTeX.

Original NVD text.

What to do

  1. Apply the vendor's security update for Katex.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
npm katex ≥ 0.12.0 < 0.16.21 0.16.21 npm install katex@0.16.21

Per OSV / GitHub Advisories (GHSA-cg87-wmx4-v546). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
katexkatex≥ 0.12.0 < 0.16.21

Official sources

References

Links published by the sources. Open them with care.