Skip to content
Fencer Vulns
medium 5.5

CVE-2024-28246 json

KaTeX is missing normalization of the protocol in URLs allows bypassing forbidden protocols

published 2024-03-25 2 y ago modified 2026-09-10 1 mo ago also GHSA-3wc5-fcw2-2329 , EUVD-2024-0807

cvss
5.5
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.4%
EPSS 0.4% chance of exploitation in 30 days, percentile 35%
public exploits
0
none known

Summary

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.

Patch / fix

  • npm katex 0.16.10
  • katex katex 0.16.10
  • node-katex Debian 14, Debian 13 0.16.10+~cs6.1.0-1

debian advisories DEBIAN-CVE-2024-28246

  • node-katex Ubuntu Pro 22.04 LTS 0.13.11+~cs6.0.0-2ubuntu0.1~esm1

ubuntu advisories UBUNTU-CVE-2024-28246

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2024-28246 updated cvss 5.5

katex: allow malicious input to generate `javascript:` links in the output

  • Red Hat All currently supported Red Hat products
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
2 y ago

Exploit prediction

0.41% chance of exploitation in the next 30 days, higher than 35% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 5.5 CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L
NVD 3.1 5.4 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
GitHub 3.1 5.5 CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L

Affected packages

ecosystem package affected fixed in
npm katex
>=0.11.0, <0.16.10
0.16.10

Affected products

  • KaTeX KaTeX

Classification

Weakness
  • CWE-184 Incomplete List of Disallowed Inputs
  • CWE-697 Incorrect Comparison

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.