Read the docs
TI-2025-16992 Aliases CVE-2025-23207GHSA-cg87-wmx4-v546

\htmlData does not validate attribute names in KaTeX

Priority LOW 32CWE-116Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Cross-site scripting
Confidentiality · integrity · availability
Low · Low · None
Fix status
Fixed

Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-79.

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00406 35th percentileScored 2026-11-07
Fix Fixed KaTeX (KaTeX): 0.16.21katex (npm): 0.16.21Red Hat: 1 advisory

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
KaTeXKaTeX0.12.0 to before 0.16.210.16.21Patch availableCNA
—katex (npm)0.12.0 to before 0.16.210.16.21Patch availableGHSA-cg87-wmx4-v546
  • KaTeX VendorKaTeX Affected 0.12.0 to before 0.16.21 Fixed in 0.16.21 Patch available CNA
  • katex (npm) Vendor— Affected 0.12.0 to before 0.16.21 Fixed in 0.16.21 Patch available GHSA-cg87-wmx4-v546

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:katex:katex:*:*:*:*:*:*:*:*0.12.0 to before 0.16.21VulnerableKaTeX
  • cpe:2.3:a:katex:katex:*:*:*:*:*:*:*:* Versions 0.12.0 to before 0.16.21 Vulnerable ·KaTeX

Remediation

  • Fix · CNA KaTeX (KaTeX) Fixed in 0.16.21
  • Fix · GHSA-cg87-wmx4-v546 katex (npm) Fixed in 0.16.21 Advisory →

Red Hat 1 advisory

  • RHSA-2025:2753 Released 2025-03-13 · Red Hat rating Moderate
    Red Hat OpenShift Dev Spaces 3.19.0 release
    • Red Hat OpenShift Dev Spaces 3 devspaces-tech-preview/idea-rhel9, devspaces-tech-preview/jetbrains-ide-rhel9, devspaces/code-rhel9 +10

Vendor assessments

Red Hat

Red Hat rating: Moderate. Red Hat's page for this CVE →

ProductStatusPlan or fix
Red Hat OpenShift Dev Spaces 3Fixed RHSA-2025:2753

Timeline

  1. 2026-10-02 Threatist record created from CVE-2025-23207
  2. 2026-10-03 Alias added: GHSA-cg87-wmx4-v546

References

  • TI-2024-18803 KaTeX's maxExpand bypassed by Unicode sub/superscripts CVSS 3.1MEDIUM 6.5
  • TI-2024-18802 KaTeX's maxExpand bypassed by \edef CVSS 3.1MEDIUM 6.5
  • TI-2024-18804 KaTeX's \includegraphics does not escape filename CVSS 3.1MEDIUM 6.3
  • TI-2024-18805 KaTeX is missing normalization of the protocol in URLs allows bypassing forbidden protocols CVSS 3.1MEDIUM 5.5

Sources