Description
KaTeX users who render untrusted mathematical expressions with renderToString
could encounter malicious input using \htmlData
that runs arbitrary JavaScript, or generate invalid HTML.
Recommendation
Update the katex
package to the latest compatible version. Followings are version details:
- Affected version(s): >= 0.12.0, <= 0.16.20
- Patched version(s): 0.16.21
References
Related Issues
- KaTeX missing normalization of the protocol in URLs allows bypassing forbidden protocols - CVE-2024-28246
- KaTeX's maxExpand bypassed by Unicode sub/superscripts - CVE-2024-28244
- KaTeX's maxExpand bypassed by `\edef` - CVE-2024-28243
- KaTeX's `\includegraphics` does not escape filename - CVE-2024-28245
- Tags:
- npm
- katex
Anything's wrong? Let us know Last updated on September 10, 2025