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.
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.
Affected software
| Software | Affected versions |
|---|---|
katexnpm · osv:npm:katex |
|
About katex
- Weekly downloads (npm)
- 43,904,046npm, 15 Nov 2026
This is the only vulnerability in katex in our list.
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-103923
- GitHub Advisory Database https://github.com/advisories/GHSA-238p-pmpm-9mq7