Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. katex
  4. ›
  5. CVE-2024-28246

CVE-2024-28246: KaTeX missing normalization of the protocol in URLs allows bypassing forbidden protocols

March 25, 2024

Code 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) => context.protocol !== 'javascript'.

References

  • github.com/KaTeX/KaTeX
  • github.com/KaTeX/KaTeX/commit/fc5af64183a3ceb9be9d1c23a275999a728593de
  • github.com/KaTeX/KaTeX/security/advisories/GHSA-3wc5-fcw2-2329
  • github.com/advisories/GHSA-3wc5-fcw2-2329
  • nvd.nist.gov/vuln/detail/CVE-2024-28246

Code Behaviors & Features

Detect and mitigate CVE-2024-28246 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 0.11.0 before 0.16.10

Fixed versions

  • 0.16.10

Solution

Upgrade to version 0.16.10 or above.

Impact 5.5 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L

Learn more about CVSS

Weakness

  • CWE-184: Incomplete List of Disallowed Inputs

Source file

npm/katex/CVE-2024-28246.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:49 +0000.