
Loading

Loading
We use strictly necessary cookies to run this site, and analytics cookies to understand how it's used. See our Privacy Policy for details.
A GitHub-reviewed security advisory, not necessarily under active exploitation the way our CISA KEV advisories are, but a real, disclosed vulnerability in an open-source dependency.
Affected packages
Vulnerable: >= 0.11.0, < 0.18.2
Patched in 0.18.2
Details
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.
Upgrade to KaTeX v0.18.2 to remove this vulnerability.
delete Object.prototype.trust, delete Object.prototype.default, and delete Object.prototype.processor before calling KaTeXKaTeX previously used ordinary JavaScript property access in the following contexts:
default and processor setting metadata could be inherited from Object.prototype.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.
If you have any questions or comments about this advisory:
EPSS, exploit probability
Low0.30%
estimated chance of real-world exploitation in the next 30 days, higher than 23.1% of every CVE FIRST.org scores
Refreshed 11/20/2026, via FIRST.org's EPSS model, not CVSS, this measures likelihood of exploitation, not how severe it would be.
More npm advisories
Talk to us about this
Find out whether this dependency (or others like it) is actually reachable in your codebase.
Get help patching, or building dependency-scanning into your pipeline going forward.
A secure code review or supply chain review finds this before an advisory does.