6.3medium
KaTeX's \includegraphics does not escape filename
- Severity
- 6.3medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.55% (higher than 40% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-f98w-7cxr-ff2h
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| KaTeX KaTeX | >= 0.11.0, < 0.6.10, from 0.11.0 before 0.16.10 | CVE List, NVD |
| katex (npm) | from 0.11.0 before 0.16.10 | GitHub Advisory Database |
All scores
| GitHub_M | 6.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L |
| GitHub | 6.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L |
| NVD | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
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.
GitHub Advisory Database
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
- Email us at katex-security@mit.edu
NVD (es)
KaTeX es una librería de JavaScript para la representación matemática de TeX en la web. Los usuarios de KaTeX que representan expresiones matemáticas que no son de confianza podrían encontrar entradas maliciosas utilizando `\includegraphics` que ejecuta JavaScript arbitrario o generar HTML no válido. Actualice a KaTeX v0.16.10 para eliminar esta vulnerabilidad.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-28245 changed 2024-08-02 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-f98w-7cxr-ff2h changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2024-28245 changed 2026-06-17 | Public domain |