CVE-2025-23207
JavaScript vulnerability analysis and mitigation

Overview

KaTeX, a fast JavaScript library for TeX math rendering on the web, was found to contain a security vulnerability (CVE-2025-23207) discovered on January 17, 2025. The vulnerability affects versions greater than or equal to 0.12.0 and less than or equal to 0.16.20. The issue specifically involves the renderToString function when processing untrusted mathematical expressions using the \htmlData command (GitHub Advisory, NVD).

Technical details

The vulnerability stems from insufficient validation of attribute names in the \htmlData command. When processing mathematical expressions, the function failed to properly validate HTML attribute names, allowing for the generation of invalid or potentially malicious HTML. The issue has been assigned a CVSS v3.1 base score of 6.3 (Moderate) with the vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L. The vulnerability is classified under CWE-116 (Improper Encoding or Escaping of Output) (GitHub Advisory).

Impact

The vulnerability could allow attackers to execute arbitrary JavaScript through maliciously crafted mathematical expressions or generate invalid HTML when using the renderToString function with untrusted input. This poses potential security risks for applications that process user-supplied mathematical content using KaTeX (GitHub Advisory).

Mitigation and workarounds

Users are advised to upgrade to KaTeX version 0.16.21 which contains the fix for this vulnerability. For those unable to upgrade immediately, several workarounds are available: disable or turn off the trust option, configure it to forbid \htmlData commands, block inputs containing the substring \htmlData, and implement HTML output sanitization. A patch has been implemented to validate HTML attribute names properly (GitHub Advisory, Red Hat).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-22610HIGH8.5
  • JavaScriptJavaScript
  • angular.js
NoYesJan 10, 2026
CVE-2026-22595HIGH8.1
  • JavaScriptJavaScript
  • ghost
NoYesJan 10, 2026
CVE-2026-22594HIGH8.1
  • JavaScriptJavaScript
  • ghost
NoYesJan 10, 2026
CVE-2026-22596MEDIUM6.7
  • JavaScriptJavaScript
  • ghost
NoYesJan 10, 2026
CVE-2026-22597LOW2
  • JavaScriptJavaScript
  • ghost
NoYesJan 10, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management