Description
KaTeX is a fast, easy-to-use JavaScript library for TeX math rendering on the web. From 0.11.0 until 0.18.2, KaTeX uses ordinary JavaScript property access for the renderer options object, the trust setting, default and processor setting metadata, and namespace lookup and group restoration, allowing inherited properties to be treated as explicitly supplied values. When Object.prototype is already polluted or an attacker controls the options object's prototype, attacker-controlled mathematical expressions can use an inherited trust value to enable trusted rendering and produce links capable of user-interaction cross-site scripting or loading attacker-selected external resources in a consuming application that inserts unsanitized KaTeX output into a page. KaTeX does not itself create the prototype pollution, and rendering an expression alone does not execute script. This issue is fixed in version 0.18.2.
Published: 2026-10-01
Score: 2.1 Low
EPSS: < 1% Very Low
KEV: No
Impact: Cross‑site scripting via prototype pollution
Action: Apply patch
AI Analysis

Impact

KaTeX versions 0.11.0 through 0.18.1 used direct JavaScript property access for renderer options and trust configuration. This allowed an attacker to pollute Object.prototype or supply an options object with an overridden prototype, so inherited properties were treated as explicitly set. The attacker could thus set the "trust" flag to true and inject mathematical expressions containing links or external resources, leading to user‑interaction cross‑site scripting or unintended script loading within any application that inserts raw KaTeX output into a page. The vulnerability does not trigger script execution by rendering the expression alone; it requires the consuming application to incorporate the untrusted output into the DOM without sanitization.

Affected Systems

The vulnerability affects the KaTeX library from version 0.11.0 up to but excluding 0.18.2. All instances of KaTeX delivered under the KaTeX repository that have not applied the 0.18.2 release are potentially impacted. Vendors and ecosystems that embed KaTeX in web pages and rely on the trust setting to disable unsafe rendering are within scope.

Risk and Exploitability

The CVSS score of 2.1 indicates a low severity rating, and the EPSS score is less than 1 %, suggesting a very low likelihood of exploitation. The vulnerability is not listed in the CISA KEV catalog. Exploitation requires that the environment already has Object.prototype polluted or that the attacker can control the prototype of the options object supplied to the renderer. Additionally, the consuming application must render the KaTeX output into the DOM without sanitization for the XSS to succeed. While the risk of accidental misuse is relatively low, any exposed KaTeX instance that accepts custom options from untrusted sources or runs within an application that blindly injects KaTeX output presents a realistic attack surface.

Generated by OpenCVE AI on October 2, 2026 at 14:29 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade KaTeX to version 0.18.2 or later, the release that removes prototype‑pollution‑sensitive property access.
  • Audit and cleanse the runtime environment to ensure Object.prototype has not been polluted prior to rendering.
  • When passing options to KaTeX, avoid exposing mutable prototype chains or user‑controlled prototypes; verify that the options object is a plain object without unexpected inherited properties.
  • Sanitize any KaTeX output before inserting it into the DOM, or disable the trust rendering option unless the content source is strictly controlled.

Generated by OpenCVE AI on October 2, 2026 at 14:29 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-238p-pmpm-9mq7 KaTeX: Existing prototype pollution can bypass trust restrictions
History

Tue, 06 Oct 2026 02:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 02 Oct 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-79
References
Metrics threat_severity

None

cvssV3_1

{'score': 4.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N'}

threat_severity

Moderate


Thu, 01 Oct 2026 22:00:00 +0000

Type Values Removed Values Added
First Time appeared Katex
Katex katex
Vendors & Products Katex
Katex katex

Thu, 01 Oct 2026 17:45:00 +0000

Type Values Removed Values Added
Description KaTeX is a fast, easy-to-use JavaScript library for TeX math rendering on the web. From 0.11.0 until 0.18.2, KaTeX uses ordinary JavaScript property access for the renderer options object, the trust setting, default and processor setting metadata, and namespace lookup and group restoration, allowing inherited properties to be treated as explicitly supplied values. When Object.prototype is already polluted or an attacker controls the options object's prototype, attacker-controlled mathematical expressions can use an inherited trust value to enable trusted rendering and produce links capable of user-interaction cross-site scripting or loading attacker-selected external resources in a consuming application that inserts unsanitized KaTeX output into a page. KaTeX does not itself create the prototype pollution, and rendering an expression alone does not execute script. This issue is fixed in version 0.18.2.
Title KaTeX: Existing prototype pollution can bypass trust restrictions
Weaknesses CWE-807
References
Metrics cvssV4_0

{'score': 2.1, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-06T01:59:30.896Z

Reserved: 2026-10-01T14:20:19.154Z

Link: CVE-2026-103923

cve-icon Vulnrichment

Updated: 2026-10-06T01:59:25.907Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-10-01T18:17:13.053

Modified: 2026-10-06T02:17:02.757

Link: CVE-2026-103923

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-10-01T17:37:47Z

Links: CVE-2026-103923 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-02T14:30:24Z

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

  • CWE-807

    Reliance on Untrusted Inputs in a Security Decision