KaTeX up to 0.16.20 Mathematical Expression renderToString cross site scripting

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
5.6$0-$5k0.00

Summaryinfo

A vulnerability classified as problematic has been found in KaTeX up to 0.16.20. Affected by this vulnerability is the function renderToString of the component Mathematical Expression Handler. This manipulation causes cross site scripting. This vulnerability is handled as CVE-2025-23207. The attack can be initiated remotely. There is not any exploit available. It is recommended to upgrade the affected component.

Detailsinfo

A vulnerability classified as problematic was found in KaTeX up to 0.16.20. Affected by this vulnerability is the function renderToString of the component Mathematical Expression Handler. The manipulation with an unknown input leads to a cross site scripting vulnerability. The CWE definition for the vulnerability is CWE-79. The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. As an impact it is known to affect integrity. The summary by CVE is:

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.

The advisory is shared at github.com. This vulnerability is known as CVE-2025-23207 since 01/13/2025. The exploitation appears to be easy. The attack can be launched remotely. It demands that the victim is doing some kind of user interaction. Technical details are known, but no exploit is available. MITRE ATT&CK project uses the attack technique T1059.007 for this issue.

The vulnerability scanner Nessus provides a plugin with the ID 240201 (Ubuntu 22.04 LTS / 24.04 LTS / 24.10 / 25.04 : KaTeX vulnerabilities (USN-7572-1)), which helps to determine the existence of the flaw in a target environment.

Upgrading to version 0.16.21 eliminates this vulnerability. Applying the patch ff289955e81aab89086eef09254cbf88573d415c is able to eliminate this problem. The bugfix is ready for download at github.com. The best possible mitigation is suggested to be upgrading to the latest version.

The vulnerability is also documented in the vulnerability database at Tenable (240201). If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Productinfo

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 5.7
VulDB Meta Temp Score: 5.6

VulDB Base Score: 3.5
VulDB Temp Score: 3.4
VulDB Vector: 🔍
VulDB Reliability: 🔍

NVD Base Score: 7.2
NVD Vector: 🔍

CNA Base Score: 6.3
CNA Vector (GitHub_M): 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

Exploitinginfo

Class: Cross site scripting
CWE: CWE-79 / CWE-94 / CWE-74
CAPEC: 🔍
ATT&CK: 🔍

Physical: No
Local: No
Remote: Yes

Availability: 🔍
Status: Not defined

EPSS Score: 🔍
EPSS Percentile: 🔍

Price Prediction: 🔍
Current Price Estimation: 🔍

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Nessus ID: 240201
Nessus Name: Ubuntu 22.04 LTS / 24.04 LTS / 24.10 / 25.04 : KaTeX vulnerabilities (USN-7572-1)

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔍

Upgrade: KaTeX 0.16.21
Patch: ff289955e81aab89086eef09254cbf88573d415c

Timelineinfo

01/13/2025 🔍
01/18/2025 +5 days 🔍
01/18/2025 +0 days 🔍
09/09/2025 +233 days 🔍

Sourcesinfo

Product: github.com

Advisory: GHSA-cg87-wmx4-v546
Status: Confirmed

CVE: CVE-2025-23207 (🔍)
GCVE (CVE): GCVE-0-2025-23207
GCVE (VulDB): GCVE-100-292501

Entryinfo

Created: 01/18/2025 08:02
Updated: 09/09/2025 01:21
Changes: 01/18/2025 08:02 (67), 02/09/2025 22:32 (3), 06/20/2025 11:13 (2), 09/09/2025 01:21 (12)
Complete: 🔍
Cache ID: 216::103

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Do you need the next level of professionalism?

Upgrade your account now!