🛡️ CVE-2024-28245 — katex
Description
KaTeX's \includegraphics does not escape filename
Impact
KaTeX users who render untrusted mathematical expressions could encounter malicious input using \includegraphics that runs arbitrary JavaScript, or generate invalid HTML.
Patches
Upgrade to KaTeX v0.16.10 to remove this vulnerability.
Workarounds
- Avoid use of or turn off the
trustoption, or set it to forbid\includegraphicscommands. - Forbid inputs containing the substring
"\\includegraphics". - Sanitize HTML output from KaTeX.
Details
\includegraphics did not properly quote its filename argument, allowing it to generate invalid or malicious HTML that runs scripts.
For more information
If you have any questions or comments about this advisory:
- Open an issue or security advisory in the [KaTeX repository](https://github.com/KaTeX/KaTeX/)
- Email us at [email protected]
How this vulnerability can be exploited
This issue can be reached over the network, attack complexity is low, an attacker needs low-level privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality low, integrity low, availability low.
Weakness class
CVE-2024-28245 is classified as CWE-116: Improper Encoding or Escaping of Output. Output is emitted without encoding it for the context it lands in, so data is interpreted as markup or code.
Affected software
CVE-2024-28245 is recorded against 1 package.
- katex
Timeline and source
Published on 25 March 2024 and last revised on 17 June 2026. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from OSV.
References
github.com (Web)
nvd.nist.gov (Advisory)
github.com (Web)
github.com (Package)
CVE-2024-28245 on other distributions
Each distribution ships its own build and its own fixed version. Pick the one you run:
Details
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| katex | — | — |
References
Similar Threats
- Medium CVE-2025-23207
- Medium CVE-2024-28243
- Medium CVE-2024-28244
- Medium CVE-2024-28246
More CVE 2024 advisories
Browse all of CVE 2024 in the advisory index.
Vulnerability Monitoring
Track new vulnerabilities in katex
CVE-2024-28245 is rated CVSS 6.3 Medium. BotEraser monitors your WordPress installation and notifies you when software you use appears in our vulnerability database.
Set Up Free Alerts →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.