{"id":"CVE-2024-28246","aliases":["CLSA-2026-1790624011","DEBIAN-CVE-2024-28246","EUVD-2024-0807","GHSA-3wc5-fcw2-2329","UBUNTU-CVE-2024-28246","USN-7572-1"],"status":"published","title":"KaTeX is missing normalization of the protocol in URLs allows bypassing forbidden protocols","description":"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) =\u003e context.protocol !== 'javascript'`. Upgrade to KaTeX v0.16.10 to remove this vulnerability.","severity":{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00406,"percentile":0.35151,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-184","CWE-697"],"published":"2024-03-25T19:38:37Z","modified":"2026-11-02T12:02:12Z","fixes":[{"ecosystem":"npm","package":"katex","fixed_in":["0.16.10"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:13","package":"node-katex","fixed_in":["0.16.10+~cs6.1.0-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"node-katex","fixed_in":["0.16.10+~cs6.1.0-1"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:22.04:LTS","package":"node-katex","fixed_in":["0.13.11+~cs6.0.0-2ubuntu0.1~esm1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"katex","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.11.0"},{"fixed":"0.16.10"}]}]},{"source":"osv","ecosystem":"TuxCare:npm","package":"katex","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.12.0-tuxcare.0"},{"fixed":"0.12.0-tuxcare.1"}]}],"versions":["0.12.0"],"bundled":3},{"source":"osv","ecosystem":"Debian:12","package":"node-katex","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.16.10+~cs6.1.0-1","0.16.10+~cs6.1.0-10","0.16.10+~cs6.1.0-2","0.16.10+~cs6.1.0-3","0.16.10+~cs6.1.0-4","0.16.10+~cs6.1.0-5","0.16.10+~cs6.1.0-6","0.16.10+~cs6.1.0-7","0.16.10+~cs6.1.0-8","0.16.10+~cs6.1.0-9","0.16.4+~cs6.1.0-1"]},{"source":"osv","ecosystem":"Debian:13","package":"node-katex","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.16.10+~cs6.1.0-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"node-katex","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.16.10+~cs6.1.0-1"}]}]},{"source":"osv","ecosystem":"npm","package":"katex","ranges":[{"type":"SEMVER","events":[{"introduced":"0.11.0"},{"fixed":"0.16.10"}]}]},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"node-katex","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.13.11+~cs6.0.0-2ubuntu0.1~esm1"}]}],"versions":["0.10.2+dfsg-8","0.10.2+dfsg-9","0.10.2+dfsg-10","0.13.11+~cs6.0.0-2"]},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"node-katex","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.13.11+~cs6.0.0-2ubuntu0.1~esm1"}]}],"versions":["0.10.2+dfsg-8","0.10.2+dfsg-9","0.10.2+dfsg-10","0.13.11+~cs6.0.0-2"],"bundled":4},{"source":"osv","ecosystem":"Ubuntu:Pro:24.04:LTS","package":"node-katex","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.16.10+~cs6.1.0-2ubuntu0.24.04.1~esm1"}]}],"versions":["0.16.4+~cs6.1.0-1","0.16.10+~cs6.1.0-2"],"bundled":4}],"products":[{"vendor":"katex","product":"katex"}],"references":[{"url":"https://github.com/KaTeX/KaTeX/security/advisories/GHSA-3wc5-fcw2-2329","tags":["x_refsource_CONFIRM","x_transferred","Mitigation","Third Party Advisory","advisory","web","report"]},{"url":"https://github.com/KaTeX/KaTeX/commit/fc5af64183a3ceb9be9d1c23a275999a728593de","tags":["x_refsource_MISC","x_transferred","Patch","fix","web","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-28246","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-3wc5-fcw2-2329"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/28xxx/CVE-2024-28246.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2024-28246","tags":["advisory"]},{"url":"https://github.com/KaTeX/KaTeX","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2024-28246","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2024-28246","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-7572-1","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2024-28243","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2024-28245","tags":["report"]},{"url":"https://ubuntu.com/security/CVE-2025-23207","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2024-28246","title":"KaTeX is missing normalization of the protocol in URLs allows bypassing forbidden protocols","description":"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) =\u003e context.protocol !== 'javascript'`. Upgrade to KaTeX v0.16.10 to remove this vulnerability.","status":"published","published":"2024-03-25T20:00:17.211Z","modified":"2024-08-02T00:48:49.457Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L","level":"medium","assessor":"cna"}],"cwes":["CWE-184","CWE-697"],"updated_at":"2026-11-02T14:34:18.951288Z"}],"euvd":[{"id":"EUVD-2024-0807","description":"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) =\u003e context.protocol !== 'javascript'`. Upgrade to KaTeX v0.16.10 to remove this vulnerability.","status":"published","published":"2024-03-25T20:00:17Z","modified":"2024-08-02T00:48:49Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L","level":"medium"}],"updated_at":"2026-11-03T03:50:26.752963Z"}],"ghsa":[{"id":"GHSA-3wc5-fcw2-2329","title":"KaTeX missing normalization of the protocol in URLs allows bypassing forbidden protocols","description":"### Impact\n\nCode that uses KaTeX's `trust` option, specifically that provides a function to block-list 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) =\u003e context.protocol !== 'javascript'`.\n\n### Patches\nUpgrade to KaTeX v0.16.10 to remove this vulnerability.\n\n### Workarounds\n* Allow-list instead of block protocols in your `trust` function.\n* Manually lowercase `context.protocol` via `context.protocol.toLowerCase()` before attempting to check for certain protocols.\n* Avoid use of or turn off the `trust` option.\n\n\n### Details\nKaTeX did not normalize the `protocol` entry of the `context` object provided to a user-specified `trust`-function, so it could be a mix of lowercase and/or uppercase letters.\n\nIt is generally better to allow-list by protocol, in which case this would normally not be an issue. But in some cases, you might want to block-list, and the [KaTeX documentation](https://katex.org/docs/options.html) even provides such an example:\n\n\u003e Allow all commands but forbid specific protocol: `trust: (context) =\u003e context.protocol !== 'file'`\n\nCurrently KaTeX internally sees `file:` and `File:` URLs as different protocols, so `context.protocol` can be `file` or `File`, so the above check does not suffice.  A simple workaround would be:\n\n\u003e `trust: (context) =\u003e context.protocol.toLowerCase() !== 'file'`\n\nMost URL parsers normalize the scheme to lowercase. For example, [RFC3986](https://datatracker.ietf.org/doc/html/rfc3986#section-3.1) says:\n\n\u003e Although schemes are case-insensitive, the canonical form is lowercase and documents that specify schemes must do so with lowercase letters. An implementation should accept uppercase letters as equivalent to lowercase in scheme names (e.g., allow \"HTTP\" as well as \"http\") for the sake of robustness but should only produce lowercase scheme names for consistency.\n","status":"published","published":"2024-03-25T19:38:37Z","modified":"2024-03-25T22:32:12Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L","level":"medium"}],"cwes":["CWE-184"],"updated_at":"2026-11-02T14:37:41.821668Z"}],"nvd":[{"id":"CVE-2024-28246","description":"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) =\u003e context.protocol !== 'javascript'`. Upgrade to KaTeX v0.16.10 to remove this vulnerability.","status":"published","published":"2024-03-25T20:15:08.58Z","modified":"2026-06-17T07:21:15.42Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L","level":"medium","assessor":"secondary"},{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-184","CWE-697"],"updated_at":"2026-11-02T14:09:43.052376Z"}],"osv":[{"id":"CVE-2024-28246","title":"KaTeX is missing normalization of the protocol in URLs allows bypassing forbidden protocols","description":"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) =\u003e context.protocol !== 'javascript'`. Upgrade to KaTeX v0.16.10 to remove this vulnerability.","status":"published","published":"2024-03-25T20:00:17.211Z","modified":"2026-10-28T02:30:34.245187457Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L","level":"medium"}],"cwes":["CWE-184","CWE-697"],"updated_at":"2026-11-02T15:44:39.569658Z"},{"id":"DEBIAN-CVE-2024-28246","description":"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) =\u003e context.protocol !== 'javascript'`. Upgrade to KaTeX v0.16.10 to remove this vulnerability.","status":"published","published":"2024-03-25T20:15:08.58Z","modified":"2026-11-02T12:02:12.225023032Z","cvss":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T15:45:42.530184Z"},{"id":"GHSA-3wc5-fcw2-2329","title":"KaTeX missing normalization of the protocol in URLs allows bypassing forbidden protocols","description":"### Impact\n\nCode that uses KaTeX's `trust` option, specifically that provides a function to block-list 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) =\u003e context.protocol !== 'javascript'`.\n\n### Patches\nUpgrade to KaTeX v0.16.10 to remove this vulnerability.\n\n### Workarounds\n* Allow-list instead of block protocols in your `trust` function.\n* Manually lowercase `context.protocol` via `context.protocol.toLowerCase()` before attempting to check for certain protocols.\n* Avoid use of or turn off the `trust` option.\n\n\n### Details\nKaTeX did not normalize the `protocol` entry of the `context` object provided to a user-specified `trust`-function, so it could be a mix of lowercase and/or uppercase letters.\n\nIt is generally better to allow-list by protocol, in which case this would normally not be an issue. But in some cases, you might want to block-list, and the [KaTeX documentation](https://katex.org/docs/options.html) even provides such an example:\n\n\u003e Allow all commands but forbid specific protocol: `trust: (context) =\u003e context.protocol !== 'file'`\n\nCurrently KaTeX internally sees `file:` and `File:` URLs as different protocols, so `context.protocol` can be `file` or `File`, so the above check does not suffice.  A simple workaround would be:\n\n\u003e `trust: (context) =\u003e context.protocol.toLowerCase() !== 'file'`\n\nMost URL parsers normalize the scheme to lowercase. For example, [RFC3986](https://datatracker.ietf.org/doc/html/rfc3986#section-3.1) says:\n\n\u003e Although schemes are case-insensitive, the canonical form is lowercase and documents that specify schemes must do so with lowercase letters. An implementation should accept uppercase letters as equivalent to lowercase in scheme names (e.g., allow \"HTTP\" as well as \"http\") for the sake of robustness but should only produce lowercase scheme names for consistency.\n","status":"published","published":"2024-03-25T19:38:37Z","modified":"2026-09-10T03:50:09.938109578Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L","level":"medium"}],"cwes":["CWE-184"],"updated_at":"2026-11-02T15:46:36.092962Z"},{"id":"UBUNTU-CVE-2024-28246","description":"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) =\u003e context.protocol !== 'javascript'`. Upgrade to KaTeX v0.16.10 to remove this vulnerability.","status":"published","published":"2024-03-25T20:15:00Z","modified":"2026-02-04T08:39:41.260569Z","cvss":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L","level":"medium"},{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T16:54:48.333535Z"},{"id":"CLSA-2026-1790624011","title":"TuxCare security update for katex (3 CVEs)","description":"TuxCare rebuilt katex to address 3 CVEs. Fixed in 0.12.0-tuxcare.1.","status":"published","published":"2026-09-28T19:33:31Z","modified":"2026-10-15T09:48:03.995587292Z","updated_at":"2026-11-02T15:43:48.65893Z"},{"id":"USN-7572-1","title":"node-katex vulnerabilities","description":"Juho Forsén discovered that KaTeX did not correctly handle certain\ninputs, which could lead to an infinite loop. If a user or application\nwere tricked into opening a specially crafted file, an attacker could\npossibly use this issue to cause a denial of service. This issue only\naffected Ubuntu 22.04 LTS. (CVE-2024-28243)\n\nTobias S. Fink discovered that KaTeX did not correctly block certain\nURL protocols. If a user or system were tricked into opening a specially\ncrafted file, an attacker could possibly use this issue to execute\narbitrary code. This issue only affected Ubuntu 22.04 LTS.\n(CVE-2024-28246)\n\nIt was discovered that KaTeX did not correctly handle certain inputs. If\na user or system were tricked into opening a specially crafted file, an\nattacker could possibly use this issue to execute arbitrary code. This\nissue only affected Ubuntu 22.04 LTS. (CVE-2024-28245)\n\nSean Ng discovered that KaTeX did not correctly handle certain inputs. If\na user or system were tricked into opening a specially crafted file, an\nattacker could possibly use this issue to execute arbitrary code.\n(CVE-2025-23207)","status":"published","published":"2025-06-17T00:46:27Z","modified":"2026-04-27T18:03:44.012907Z","updated_at":"2026-11-02T16:58:19.988474Z"}]}}
