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.
CVE-2024-28246 - Medium Severity Vulnerability
Vulnerable Library - katex-0.11.1.tgz
Fast math typesetting for the web.
Library home page: https://registry.npmjs.org/katex/-/katex-0.11.1.tgz
Path to dependency file: /pro-table/package.json
Path to vulnerable library: /pro-table/node_modules/katex/package.json
Dependency Hierarchy: - dumi-1.0.20.tgz (Root Library) - preset-dumi-1.0.20.tgz - :x: **katex-0.11.1.tgz** (Vulnerable Library)
Found in HEAD commit: 50a539d66e7a2f790cf8a8d8d1471993698c9adc
Found in base branch: master
Vulnerability Details
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.
Publish Date: 2024-03-25
URL: CVE-2024-28246
CVSS 3 Score Details (5.5)
Base Score Metrics: - Exploitability Metrics: - Attack Vector: Network - Attack Complexity: Low - Privileges Required: Low - User Interaction: Required - Scope: Unchanged - Impact Metrics: - Confidentiality Impact: Low - Integrity Impact: Low - Availability Impact: Low
For more information on CVSS3 Scores, click here.Suggested Fix
Type: Upgrade version
Origin: https://www.cve.org/CVERecord?id=CVE-2024-28246
Release Date: 2024-03-25
Fix Resolution: katex - 0.16.10
Step up your Open Source Security Game with Mend here