CVE-2024-28246
MEDIUM 5.4CVSS 3.1KaTeX missing normalization of the protocol in URLs allows bypassing forbidden protocols
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.
- Published
- 25 Mar 2024
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-184
- Also known as
- GHSA-3wc5-fcw2-2329
- Sources
- NVDJSONOSV GHSA-3wc5-fcw2-2329JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 5.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 5.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | katex | katexcpe:2.3:a:katex:katex:*:*:*:*:*:*:*:* |
>= 0.11.0, < 0.16.10 | 0.16.10 |
| OSV | npm | katex | >= 0.11.0, < 0.16.10 | 0.16.10 |
References
- https://github.com/KaTeX/KaTeX/commit/fc5af64183a3ceb9be9d1c23a275999a728593de · Patch, WEB
- https://github.com/KaTeX/KaTeX/security/advisories/GHSA-3wc5-fcw2-2329 · Mitigation, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-28246 · ADVISORY
- https://github.com/KaTeX/KaTeX · PACKAGE
History
- 25 Nov 2026 20:55 UTC · NVD: first stored (published 25 Mar 2024)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 25 Mar 2024)