All vulnerabilities

npm

CVE-2026-103923

KaTeX: Existing prototype pollution can bypass trust restrictions

Severity
Low
Published
5 Oct 2026
Last changed
6 Oct 2026
Added to UpHeron
10 Nov 2026
Fixed in
0.18.2
Exploit chance
0.3% in the next 30 daysHigher than 23% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
CWE-807
Also known as
GHSA-238p-pmpm-9mq7
Sources
OSV.dev and GitHub

Description

KaTeX can act as a read-side prototype pollution gadget in applications where Object.prototype has already been polluted, or where an attacker can influence the prototype of the renderer options object. (KaTeX does not enable said prototype pollution. This advisory applies when combining KaTeX with other vulnerable software that allows for prototype pollution.)

Affected versions may treat inherited properties from Object.prototype as renderer options, internal setting metadata, or namespace entries. In particular, an inherited trust value will be treated as though the application explicitly enabled trusted rendering, rather than using the documented default of false.

With attacker-controlled mathematical expressions, this can produce links capable of user-interaction cross-site scripting or load attacker-selected external resources. Exploitation requires the consuming application to insert KaTeX output into a web page without a separate sanitizer.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Workarounds

  • Address any prototype-pollution vulnerability in the application or its dependencies.
  • delete Object.prototype.trust, delete Object.prototype.default, and delete Object.prototype.processor before calling KaTeX
  • Do not allow untrusted input to control the renderer options object or its prototype.
  • Sanitize KaTeX-generated HTML before inserting it into a document.
Workarounds as given by the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
katexnpm · osv:npm:katex
  • From 0.11.0 before 0.18.2

About katex

Weekly downloads (npm)
43,904,046npm, 15 Nov 2026

This is the only vulnerability in katex in our list.

References