Incomplete List of Disallowed Inputs Affecting katex package, versions >=0.11.0 <0.16.10
Threat Intelligence
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications- Snyk ID SNYK-JS-KATEX-6483834
- published 26 Mar 2024
- disclosed 25 Mar 2024
- credit Tobias S. Fink
Introduced: 25 Mar 2024
CVE-2024-28246 Open this link in a new tabHow to fix?
Upgrade katex
to version 0.16.10 or higher.
Overview
katex is a Fast math typesetting for the web.
Affected versions of this package are vulnerable to Incomplete List of Disallowed Inputs due to the trust
option. Specifically, the functionality that provides a function to blacklist certain URL protocols, can be bypassed by URLs in malicious inputs that utilize uppercase characters in the protocol. This can allow for the generation of javascript:
links in the output, even when the trust
function is designed to forbid this protocol.
Workaround
Users can apply the following steps to mitigate the vulnerability:
Allow-list instead of block protocols in your trust function.
Manually lowercase context.protocol via context.protocol.toLowerCase() before attempting to check for certain protocols.
Avoid use of or turn off the trust option.