CVE-2026-103923: KaTeX Prototype Pollution Vulnerability Bypasses Trust Restrictions

katex Updated 06 Oct 2026

Summary

05/10/2026
Yes i
Low
2.1

CVE-2026-103923: KaTeX: Existing prototype pollution can bypass trust restrictions. Affects katex versions >= 0.11.0, < 0.18.2. Fixed in 0.18.2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

KaTeX is a popular open-source library used for rendering mathematical expressions in web applications. It allows developers to display complex formulas using LaTeX syntax, making it a valuable tool for educational platforms, scientific applications, and any site that requires mathematical notation. However, KaTeX is susceptible to a prototype pollution vulnerability that can be exploited when combined with other vulnerable software, potentially leading to security risks.

Vulnerability Detail

The vulnerability arises from KaTeX's handling of renderer options, which can inherit properties from the prototype of the options object. If an attacker can manipulate the prototype or if the application has already been compromised, they can set inherited properties such as 'trust' to true. This can lead to unintended consequences, including cross-site scripting (XSS) attacks and the loading of malicious external resources. The vulnerability does not originate from KaTeX itself but from its interaction with other software that allows prototype pollution.

How To Fix

Latest published version: 0.19.0 as of 22 Oct 2026

npm install katex@0.19.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.18.2

This is the first release that contains the fix.

npm install katex@0.18.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

  • 0: Address any prototype-pollution vulnerabilities in your application or its dependencies.

  • 1: Delete potentially dangerous properties from Object.prototype before calling KaTeX:

  • 3: Avoid allowing untrusted input to control the renderer options object or its prototype.

  • 4: Sanitize KaTeX-generated HTML before inserting it into a document.

Conclusion

The KaTeX prototype pollution vulnerability (CVE-2026-103923) poses a significant risk to applications that use affected versions of the library. By upgrading to version 0.18.2 or later and implementing the recommended workarounds, developers can protect their applications from potential exploitation.

See every vulnerability recorded for katex →

Share this vulnerability

FAQ

Prototype pollution is a security vulnerability that allows an attacker to manipulate the prototype of an object, potentially leading to unexpected behavior in applications.

If exploited, this vulnerability can lead to cross-site scripting (XSS) attacks, allowing attackers to execute malicious scripts in the context of your application.

Your application may be vulnerable if it uses an affected version of KaTeX and allows untrusted input to influence the renderer options object.

Implement the suggested workarounds to mitigate the risk until you can upgrade to the patched version.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. You can check your application for this vulnerability using the Vulert playground without any signup.

Related vulnerabilities

Recent vulnerabilities recorded for katex.

How To Fix

Latest published version: 0.19.0 as of 22 Oct 2026

npm install katex@0.19.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.18.2

This is the first release that contains the fix.

npm install katex@0.18.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback