Skip to main content
← All vulnerabilities
CVE-2025-23207GHSA-CG87-WMX4-V546

\htmlData does not validate attribute names in KaTeX

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 0.16.21
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: no
  • Technical impact: partial

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • KaTeX KaTeX

    From 0.12.0 · fixed in 0.16.21

  • katexnpm

    From 0.12.0 · fixed in 0.16.21

References 2

GitHub · KaTeX/KaTeX