CVE-2025-23207
MEDIUM6.3EPSS 0.04%KaTeX \htmlData does not validate attribute names
描述
### Impact KaTeX users who render untrusted mathematical expressions with `renderToString` could encounter malicious input using `\htmlData` that runs arbitrary JavaScript, or generate invalid HTML. ### Patches Upgrade to KaTeX v0.16.21 to remove this vulnerability. ### Workarounds - Avoid use of or turn off the `trust` option, or set it to forbid `\htmlData` commands. - Forbid inputs containing the substring `"\\htmlData"`. - Sanitize HTML output from KaTeX. ### Details `\htmlData` did not validate its attribute name argument, allowing it to generate invalid or malicious HTML that runs scripts. ### For more information If you have any questions or comments about this advisory: - Open an issue or security advisory in the [KaTeX repository](https://github.com/KaTeX/KaTeX/) - Email us at [[email protected]](mailto:[email protected])
受影響套件(2)
- Debian/node-katexfrom 0
- npm/katex>= 0.12.0, < 0.16.21
CVSS 分數
| 來源 | 版本 | 嚴重程度 | 向量 |
|---|---|---|---|
| osv | CVSS 3.1 | MEDIUM6.3 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L |
參考連結(5)
- ADVISORYhttps://nvd.nist.gov/vuln/detail/CVE-2025-23207
- ADVISORYhttps://security-tracker.debian.org/tracker/CVE-2025-23207
- PATCHhttps://github.com/KaTeX/KaTeX
- WEBhttps://github.com/KaTeX/KaTeX/commit/ff289955e81aab89086eef09254cbf88573d415c
- WEBhttps://github.com/KaTeX/KaTeX/security/advisories/GHSA-cg87-wmx4-v546