{"id":"CVE-2024-28246","published":"2024-03-25T20:00:17Z","modified":"2024-08-02T00:48:49Z","title":"KaTeX is missing normalization of the protocol in URLs allows bypassing forbidden protocols","vendor":"KaTeX","product":"KaTeX","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00406,"percentile":0.35747,"provenance":"source"},"cwes":[{"id":"CWE-184","name":"Incomplete List of Disallowed Inputs"},{"id":"CWE-697","name":"Incorrect Comparison"}],"references":[{"url":"https://github.com/KaTeX/KaTeX/security/advisories/GHSA-3wc5-fcw2-2329","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/KaTeX/KaTeX/commit/fc5af64183a3ceb9be9d1c23a275999a728593de","tags":["x_refsource_MISC"]}],"priority":{"score":11.0,"factors":[{"name":"EPSS percentile","points":7.15},{"name":"CVSS severity","points":3.85}]},"vendorSlug":"katex","affectedVersions":[{"vendor":"KaTeX","product":"KaTeX","versions":[">= 0.11.0, < 0.16.10"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-07-16T00:04:56.873982Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"katex","vulnerableRanges":[">=0.11.0, <0.16.10"],"patched":["0.16.10"],"from":["GHSA-3wc5-fcw2-2329"],"provenance":"source"}],"summary":{"text":"KaTeX, a JavaScript library for rendering TeX math on the web, contains a flaw in how it normalizes URL protocols, which lets uppercase characters in the protocol bypass a custom trust function that blacklists protocols such as javascript. An attacker who can supply malicious input to a page using KaTeX with that trust configuration, and who needs a user to interact with the output (UI:R), with low privileges (PR:L) and no other special conditions, can cause javascript: links to be generated in the rendered output despite the protocol being forbidden.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:00:17Z"},"euvd":{"id":"EUVD-2024-0807","exploited":false,"provenance":"source"}}