CVE-2024-28246
Katex vulnerability
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.
Affected products
Katex. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Katex runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Set the orderSystems that can be reached from the internet come first, then the rest.
References
- github.com/KaTeX/KaTeX/commit/fc5af64183a3ceb9be9d1c23a275999a728593de · Patch
- github.com/KaTeX/KaTeX/security/advisories/GHSA-3wc5-fcw2-2329 · Mitigation
- nvd.nist.gov/vuln/detail/CVE-2024-28246
- github.com/advisories/GHSA-3wc5-fcw2-2329
- nvd.nist.gov/vuln/detail/CVE-2024-28246
- cve.org/CVERecord?id=CVE-2024-28246
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.