CVE-2025-23207
HIGH 7.2CVSS 3.1KaTeX \htmlData does not validate attribute names
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.
- Published
- 17 Jan 2025
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-116CWE-79
- Also known as
- GHSA-cg87-wmx4-v546
- Sources
- NVDJSONOSV GHSA-cg87-wmx4-v546JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 6.3 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.3 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | katex | katexcpe:2.3:a:katex:katex:*:*:*:*:*:*:*:* |
>= 0.12.0, < 0.16.21 | 0.16.21 |
| OSV | npm | katex | >= 0.12.0, < 0.16.21 | 0.16.21 |
References
- https://github.com/KaTeX/KaTeX/commit/ff289955e81aab89086eef09254cbf88573d415c · Patch, WEB
- https://github.com/KaTeX/KaTeX/security/advisories/GHSA-cg87-wmx4-v546 · Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2025-23207 · ADVISORY
- https://github.com/KaTeX/KaTeX · PACKAGE
History
- 25 Nov 2026 20:57 UTC · NVD: first stored (published 17 Jan 2025)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 17 Jan 2025)