Improper Encoding or Escaping of Output
CVE-2025-23207
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. This issue affects katex versions 0.12.0 through 0.16.20. Users unable to upgrade should avoid the 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.
- LOW
- NETWORK
- LOW
- UNCHANGED
- NONE
- LOW
- LOW
- LOW
CWE-116 - Improper Encoding or Escaping of Output
The software prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.
References
Advisory Timeline
- Published