VDB

CVE-2025-23207

CVE-2025-23207 PUBLISHED CVSS 6.3 MEDIUM

\htmlData does not validate attribute names in KaTeX

Reported by github_m · Published January 17, 2025

katex is fixed in 0.16.21 (npm)

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
katexnpm0.16.21
katexkatex0.16.21

Risk scores

CVSS 3.1
6.3
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L

Affected products

VendorProductVersions
KaTeXKaTeX>= 0.12.0, < 0.16.21
npmkatex0.12.0
chainguardgitlab-rails-ce-fips-18.100
KaTeXKaTeX
KaTeXKaTeX0.12.0
chainguardgitlab-rails-ce-fips-18.90

Timeline

  • Jan 17, 2025 CVE Published
  • Jan 17, 2025 PoC Published (2 in total, the first dated here)
  • Jan 17, 2025 CVE Updated
  • Jan 18, 2025 EPSS Score (30 in total, the first dated here)
  • Apr 6, 2025 Coalition ESS Score (12 in total, the first dated here)
  • Dec 21, 2025 Security Advisory (2 in total, the first dated here)
  • Aug 10, 2026 Distribution Patch

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2025-23207
vulnetix vdb fixes CVE-2025-23207

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-23207/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›