CVE-2024-28246Katex
Medium 5.4 No auth needed
Follow: this CVE · Katex · Katex We alert you by email or Slack (account required).
- Priority
- 47
- CVSS 3.1
- 5.4
- EPSS
- 0.5% probability of exploitation in 30 days · percentile 40
- Auth required
- No
- Published
- Mar 25, 2024
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
What happens
KaTeX is a JavaScript library for TeX math rendering on the web. Code that uses KaTeX's `trust` option, specifically that provides a function to blacklist certain URL protocols, can be fooled by URLs in malicious inputs that use uppercase characters in the protocol. In particular, this can allow for malicious input to generate `javascript:` links in the output, even if the `trust` function tries to forbid this protocol via `trust: (context) => context.protocol !== 'javascript'`. Upgrade to KaTeX v0.16.10 to remove this vulnerability.
What to do
- Apply the vendor's security update for Katex.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | katex |
≥ 0.11.0 < 0.16.10 |
0.16.10 |
npm install katex@0.16.10 |
Per OSV / GitHub Advisories (GHSA-3wc5-fcw2-2329). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| katex | katex | ≥ 0.11.0 < 0.16.10 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch
- github.com Mitigation Third Party Advisory