CVE-2026-103923: KaTeX: Existing prototype pollution can bypass trust restrictions

Published Oct 1, 2026
·
Updated

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.

Affected Software

1 affected component
KaTeX KaTeX>=0.11.0<0.18.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade KaTeX to a version that resolves this vulnerability.

    Fixed in 0.18.2

Event History

Oct 1, 2026
CVE Published
via MITRE·05:37 PM
Data Sourced
via MITRE·05:37 PM
DescriptionWeakness
Data Sourced
via NVD·06:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

What conditions are required for exploitation?

Object.prototype must already be polluted, or the attacker must control the prototype of the KaTeX renderer options object. The attacker must also be able to supply mathematical expressions, and the consuming application must insert unsanitized KaTeX output into a page.

2

What is the practical impact of a successful bypass?

An inherited trust value can enable trusted rendering, allowing expressions to produce links that can lead to user-interaction cross-site scripting or cause the application to load attacker-selected external resources. Rendering an expression by itself does not execute script.

3

Are applications using default KaTeX behavior directly exposed?

The issue depends on inherited properties being treated as explicitly supplied values; KaTeX does not create the required prototype pollution itself. Applications are exposed when a polluted global prototype or attacker-controlled options-object prototype can influence rendering.

4

What should be done if upgrading cannot happen immediately?

Prevent and remediate prototype pollution in the application and ensure untrusted users cannot control the prototype of KaTeX options objects. Avoid inserting unsanitized KaTeX output into pages where attacker-controlled expressions are rendered.

5

Which versions require remediation?

KaTeX versions from 0.11.0 through 0.18.2 are identified as affected. The issue is fixed in version 0.18.2.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203