CVE-2024-28245 KaTeX's \includegraphics does not escape filename
KaTeX users rendering untrusted math expressions can suffer arbitrary JavaScript execution via malicious \includegraphics input.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-28245?
CVE-2024-28245 is a medium-severity cross-site scripting vulnerability in KaTeX, published on 25 Mar 2024. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
KaTeX is a JavaScript library for TeX math rendering on the web. KaTeX users who render untrusted mathematical expressions could encounter malicious input using `\includegraphics` that runs arbitrary JavaScript, or generate invalid HTML. Upgrade to KaTeX v0.16.10 to remove this vulnerability.
Weakness: CWE-116
Which versions are affected by CVE-2024-28245?
2 open source packages ship an affected version, including katex. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
katex npm | From 0.11.0 | 0.16.10 |
katex npm | From 0.11.0 | 0.16.10 |
Products include Katex Katex.
How do I fix CVE-2024-28245?
Upgrade katex to 0.16.10 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2024-28245 being exploited?
There is no known exploitation of CVE-2024-28245 in the wild and no public exploit code.
Other vulnerabilities in KaTeX
Sources
Also known as DEBIAN-CVE-2024-28245, GHSA-f98w-7cxr-ff2h, UBUNTU-CVE-2024-28245.