CVE-2025-23207

\htmlData does not validate attribute names in KaTeX

Published Jan 17, 2025 CVSS 3.1 · 6.3 Medium EPSS < 1% KEV · Not listed
Description
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2025-0112 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.
Github GHSA Github GHSA GHSA-cg87-wmx4-v546 KaTeX \htmlData does not validate attribute names
Ubuntu USN Ubuntu USN USN-7572-1 KaTeX vulnerabilities
History
Type Values Removed Values Added
First Time appeared Katex
Katex katex
Weaknesses CWE-79
CPEs cpe:2.3:a:katex:katex:*:*:*:*:*:*:*:*
Vendors & Products Katex
Katex katex
Type Values Removed Values Added
First Time appeared Redhat
Redhat openshift Devspaces
CPEs cpe:/a:redhat:openshift_devspaces:3::el9
Vendors & Products Redhat
Redhat openshift Devspaces
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
Title \htmlData does not validate attribute names in KaTeX
Weaknesses CWE-116
References
Metrics cvssV3_1

{'score': 6.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jan 17, 2025, 9:32 PM
Reserved
Jan 13, 2025, 5:15 PM
Status
Analyzed
Published
Jan 17, 2025, 10:15 PM
Modified
Jun 17, 2026, 8:52 AM
Severity
Moderate
Public date
Jan 17, 2025, 9:25 PM