KaTeX: Existing prototype pollution can bypass trust restrictions
### 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.prot
GHSA-238p-pmpm-9mq7
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: osv:GHSA-238p-pmpm-9mq7
katex
Source reference: /affected/0/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- 0.18.2
Source reference:
/affected/0/ranges - Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0.11.0"
},
{
"fixed": "0.18.2"
}
]
}
],
"package": {
"name": "katex",
"purl": "pkg:npm/katex",
"ecosystem": "npm"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-238p-pmpm-9mq7/GHSA-238p-pmpm-9mq7.json"
}
}
]- Related CVEs
- CVE-2026-103923
Source reference:
/aliases
Publisher severity
low
Source reference: /database_specific/severity
- Event
- #85968 · Revision 1
- Added to Heist Feed
- Publisher date