Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦 npm
Not in CISA KEV

KaTeX: Existing prototype pollution can bypass trust restrictionsGHSA-238p-pmpm-9mq7

Fix: KaTeX/KaTeX#4260

GHSA-238p-pmpm-9mq7 is a CWE-807 vulnerability in katex. A fix is available for katex — see the affected versions and patch details below.

Also known asCVE-2026-103923
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Oct 23, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for GHSA-238p-pmpm-9mq7.

EPSS Exploitation Probability

via FIRST.org ↗
0.3%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs22th percentile — riskier than 22% of all scored CVEsHighest risk

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

3Kother npm packages depend on this — each one inherits the vulnerability until it's patched upstream
katexnpm
18.9Mdownloads / week

Description

Impact

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. (KaTeX does not execute scripts merely by rendering an expression.)

Other inherited settings can alter rendering behavior or resource limits. Inherited setting metadata can affect how defaults and supplied options are processed, while inherited namespace properties can be mistaken for defined macros or other internal values.

Patches

Upgrade to KaTeX v0.18.2 to remove this vulnerability.

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.

Details

KaTeX previously used ordinary JavaScript property access in the following contexts:

  • Renderer settings could be inherited from the prototype of the options object.
  • Internal default and processor setting metadata could be inherited from Object.prototype.
  • Namespace lookup could treat inherited properties as built-in definitions.
  • Namespace group restoration could preserve an inherited property as though it had been an explicitly defined value.

The fix adds own-property checks to each of these paths. Inherited properties are no longer accepted as renderer settings, setting metadata, namespace definitions, or values to be restored after a group ends.

For more information

If you have any questions or comments about this advisory:

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmkatex≥ 0.11.0&&< 0.18.20.18.2npm install katex@0.18.2

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for katex, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update katex to 0.18.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-238p-pmpm-9mq7 is resolved across your whole dependency graph.

  3. Workarounds

    Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate

A flaw of moderate impact was found in KaTeX, a JavaScript library for rendering TeX math in web pages that is bundled in Red Hat products including Red Hat OpenShift AI, Red Hat OpenShift Dev Spaces, and Red Hat Build of Podman Desktop, as well as in Fedora and EPEL community packages. KaTeX uses ordinary JavaScript…

Workaround published by Red Hat
Upstream fixed this issue in KaTeX 0.18.2, so upgrading bundled katex packages to a version that includes this fix resolves the vulnerability. Until an update can be applied, the workarounds published in the upstream advisory reduce the risk: address any prototype-pollution vulnerability in the application or its dependencies; do not allow untrusted input to control the renderer options object or its prototype; sanitize KaTeX-generated HTML before inserting it into a document; and, as a targeted measure, delete Object.prototype.trust, Object.prototype.default, and Object.prototype.processor before calling KaTeX.
Source: Red Hat security advisory for GHSA-238p-pmpm-9mq7 (CC BY 4.0)

Frequently Asked Questions

### Impact 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 applic
O3 Security · Impact-Aware SCA

Is GHSA-238p-pmpm-9mq7 in your dependencies?

Find it across npm, including transitive dependencies.

KaTeX: Existing prototype pollution can bypass trust…