CVE-2025-23207 json
\htmlData does not validate attribute names in KaTeX
published last yr. modified 4mo ago also EUVD-2025-0112 , GHSA-cg87-wmx4-v546
- cvss
- 6.3
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 35%
- public exploits
- 0
- none known
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.
Patch / fix
- npm katex 0.16.21
- katex katex 0.16.21
- node-katex Debian 14 0.16.10+~cs6.1.0-7
debian advisories DEBIAN-CVE-2025-23207
- node-katex Ubuntu 26.04 LTS, Ubuntu 25.10 0.16.10+~cs6.1.0-2ubuntu1
- node-katex Ubuntu Pro 22.04 LTS 0.13.11+~cs6.0.0-2ubuntu0.1~esm1
- node-katex Ubuntu Pro 24.04 LTS 0.16.10+~cs6.1.0-2ubuntu0.24.04.1~esm1
ubuntu advisories UBUNTU-CVE-2025-23207
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
Is CVE-2025-23207 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2025-23207 updated cvss 6.3
katex: \htmlData does not validate attribute names in KaTeX
-
Red Hat OpenShift Dev Spaces 3 devspaces/udi-rhel9 latest, devspaces/code-rhel9 3.19-20, devspaces/server-rhel9 3.19-11, devspaces/traefik-rhel9 3.19-2, devspaces/configbump-rhel9 latest, devspaces/dashboard-rhel9 3.19-18, +7 morefixed: vendor fix “Users unable to upgrade should turn off the `trust` option or set it to forbid `\htmlData` commands, forbid inputs containing the substring `"\\htmlData"` and sanitize HTML output from KaTeX.” RHSA-2025:2753
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- last yr.
Exploit prediction
0.41% chance of exploitation in the next 30 days, higher than 35% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 6.3 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L |
| GitHub | 3.1 | 6.3 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L |
| NVD | 3.1 | 7.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | katex | >=0.12.0, <0.16.21 |
0.16.21 |
Affected products
- KaTeX KaTeX
Classification
References
-
github.com
/KaTeX/KaTeX/commit/ff289955e81aab89086eef09254cbf88573d415c
web, patch
-
github.com
/KaTeX/KaTeX/security/advisories/GHSA-cg87-wmx4-v546
web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2025-23207
advisory
-
github.com
/KaTeX/KaTeX
package
Sources
- CVE List CVE-2025-23207
- GitHub Advisory GHSA-cg87-wmx4-v546
- NVD CVE-2025-23207
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.