katex
0.19.1 · 23 Oct 2026MIT47.8M / weekRepositoryHomepagenpmAtom feed
Your version
0.19.1 is the newest release of 0.14.x.
In short
1 breaking1 new
- Breaking
With module loaders that support conditional exports and ECMAScript modules,
import katex from 'katex';will import the ECMAScript module.
Security
5 advisories affect 0.14.0; 0.18.2 fixes them
- ModerateKaTeX \htmlData does not validate attribute namesGHSA-cg87-wmx4-v546 · 17 Jan 2025Fixed in 0.16.21
- ModerateKaTeX missing normalization of the protocol in URLs allows bypassing forbidden protocolsGHSA-3wc5-fcw2-2329 · 25 Mar 2024Fixed in 0.16.10
- ModerateKaTeX's `\includegraphics` does not escape filenameGHSA-f98w-7cxr-ff2h · 25 Mar 2024Fixed in 0.16.10
- ModerateKaTeX's maxExpand bypassed by `\edef`GHSA-64fm-8hw2-v72w · 25 Mar 2024Fixed in 0.16.10
- LowKaTeX: Existing prototype pollution can bypass trust restrictionsGHSA-238p-pmpm-9mq7 · 5 Oct 2026Fixed in 0.18.2
Release note
Features
Conditionally export ECMAScript modules
Breaking changes
- Breaking
With module loaders that support conditional exports and ECMAScript modules,
import katex from 'katex';will import the ECMAScript module.
You can now use:
| Before | After |
|---|---|
require('katex/dist/contrib/[name].js') | require('katex/contrib/[name]') |
import katex from 'katex/dist/katex.mjs' | import katex from 'katex' |
import 'katex/dist/contrib/[name].mjs' | import 'katex/contrib/[name]' |
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.