KaTeX up to 0.16.20 Mathematical Expression renderToString cross site scripting
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 5.6 | $0-$5k | 0.00 |
Summary
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.
Details
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.
Product
Name
Version
- 0.16.0
- 0.16.1
- 0.16.2
- 0.16.3
- 0.16.4
- 0.16.5
- 0.16.6
- 0.16.7
- 0.16.8
- 0.16.9
- 0.16.10
- 0.16.11
- 0.16.12
- 0.16.13
- 0.16.14
- 0.16.15
- 0.16.16
- 0.16.17
- 0.16.18
- 0.16.19
- 0.16.20
License
Website
- Product: https://github.com/KaTeX/KaTeX/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔍VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 5.7VulDB 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): 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍
Exploiting
Class: Cross site scriptingCWE: 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-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Nessus ID: 240201
Nessus Name: Ubuntu 22.04 LTS / 24.04 LTS / 24.10 / 25.04 : KaTeX vulnerabilities (USN-7572-1)
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔍
Upgrade: KaTeX 0.16.21
Patch: ff289955e81aab89086eef09254cbf88573d415c
Timeline
01/13/2025 🔍01/18/2025 🔍
01/18/2025 🔍
09/09/2025 🔍
Sources
Product: github.comAdvisory: GHSA-cg87-wmx4-v546
Status: Confirmed
CVE: CVE-2025-23207 (🔍)
GCVE (CVE): GCVE-0-2025-23207
GCVE (VulDB): GCVE-100-292501
Entry
Created: 01/18/2025 08:02Updated: 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.
No comments yet. Languages: en.
Please log in to comment.