PT-2025-1297

CVE-2025-23207

·

Published

2025-01-17

·

Updated

2025-09-08

Description by

CVSS 3.1
7.2
High
MetricsAV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
Name of the Vulnerable Software and Affected Versions KaTeX versions prior to 0.16.21
Description The issue is related to the renderToString function in the KaTeX JavaScript library, which is used for rendering mathematical expressions. It is caused by incorrect encoding or escaping of output when handling the htmlData parameter. This could allow a remote attacker to execute arbitrary code. Users who render untrusted mathematical expressions with renderToString could encounter malicious input using htmlData that runs arbitrary JavaScript or generates invalid HTML.
Recommendations For versions prior to 0.16.21, upgrade to KaTeX v0.16.21 to remove this vulnerability. As a temporary workaround, consider turning off the trust option or setting it to forbid htmlData commands. Forbid inputs containing the substring "htmlData". Sanitize HTML output from KaTeX to minimize the risk of exploitation.
Exploitability
Exploit
Fix
Impacts
Researchers
Vendors
Affected products
Related identifiers
GHSA-CG87-WMX4-V546
USN-7572-1
Found an issue in the description? Have something to add? Feel free to write us 👾