Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. katex
  4. ›
  5. CVE-2025-23207

CVE-2025-23207: KaTeX \htmlData does not validate attribute names

January 17, 2025 (updated January 21, 2025)

KaTeX users who render untrusted mathematical expressions with renderToString could encounter malicious input using \htmlData that runs arbitrary JavaScript, or generate invalid HTML.

References

  • github.com/KaTeX/KaTeX
  • github.com/KaTeX/KaTeX/commit/ff289955e81aab89086eef09254cbf88573d415c
  • github.com/KaTeX/KaTeX/security/advisories/GHSA-cg87-wmx4-v546
  • github.com/advisories/GHSA-cg87-wmx4-v546
  • nvd.nist.gov/vuln/detail/CVE-2025-23207

Code Behaviors & Features

Detect and mitigate CVE-2025-23207 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 0.12.0 before 0.16.21

Fixed versions

  • 0.16.21

Solution

Upgrade to version 0.16.21 or above.

Impact 6.3 MEDIUM

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

Learn more about CVSS

Weakness

  • CWE-116: Improper Encoding or Escaping of Output

Source file

npm/katex/CVE-2025-23207.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:49 +0000.