CVE-2024-28245
KaTeX's \includegraphics does not escape filename
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- Low
Exploit likelihood
What each source reports
CVE List Score used
6.3
KaTeX's \includegraphics does not escape filename
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.
- Record
CVE-2024-28245- CVSS 3.1
- 6.3 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L - Weakness
- CWE-116
- Updated
- 2026-11-02
EUVDEUVD-2024-0914
6.3
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.
- Record
EUVD-2024-0914- CVSS 3.1
- 6.3 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-f98w-7cxr-ff2h
6.3
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
- Email us at [email protected]
- Record
GHSA-f98w-7cxr-ff2h- CVSS 3.1
- 6.3 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L - Weakness
- CWE-116
- Updated
- 2026-11-02
NVD
6.3
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.
- Record
CVE-2024-28245- CVSS 3.1
- 6.3 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L - CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-116
- Updated
- 2026-11-02
OSV
6.3
KaTeX's \includegraphics does not escape filename
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.
- Record
CVE-2024-28245- CVSS 3.1
- 6.3 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L - Weakness
- CWE-116
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2024-28245
6.1
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.
- Record
DEBIAN-CVE-2024-28245- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-02
Show 4 moreShow less
OSVGHSA-f98w-7cxr-ff2h
6.3
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
- Email us at [email protected]
- Record
GHSA-f98w-7cxr-ff2h- CVSS 3.1
- 6.3 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L - Weakness
- CWE-116
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2024-28245
6.3
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.
- Record
UBUNTU-CVE-2024-28245- CVSS 3.1
- 6.3 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L - CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-02
OSVCLSA-2026-1790624011 No score
TuxCare security update for katex (3 CVEs)
TuxCare rebuilt katex to address 3 CVEs. Fixed in 0.12.0-tuxcare.1.
- Record
CLSA-2026-1790624011- Updated
- 2026-11-02
OSVUSN-7572-1 No score
node-katex vulnerabilities
Juho Forsén discovered that KaTeX did not correctly handle certain inputs, which could lead to an infinite loop. If a user or application were tricked into opening a specially crafted file, an attacker could possibly use this issue to cause a denial of service. This issue only affected Ubuntu 22.04 LTS. (CVE-2024-28243)
Tobias S. Fink discovered that KaTeX did not correctly block certain URL protocols. If a user or system were tricked into opening a specially crafted file, an attacker could possibly use this issue to execute arbitrary code. This issue only affected Ubuntu 22.04 LTS. (CVE-2024-28246)
It was discovered that KaTeX did not correctly handle certain inputs. If a user or system were tricked into opening a specially crafted file, an attacker could possibly use this issue to execute arbitrary code. This issue only affected Ubuntu 22.04 LTS. (CVE-2024-28245)
Sean Ng discovered that KaTeX did not correctly handle certain inputs. If a user or system were tricked into opening a specially crafted file, an attacker could possibly use this issue to execute arbitrary code. (CVE-2025-23207)
- Record
USN-7572-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
katexnpm |
0.11.0 up to 0.16.10 | 0.16.10 |
katexTuxCare:npm From an advisory covering 3 CVEs |
0.12.0-tuxcare.0 up to 0.12.0-tuxcare.1, plus listed versions 0.12.0 |
0.12.0-tuxcare.1 |
node-katexDebian:12 |
All versions, plus listed versions 0.16.10+~cs6.1.0-10.16.10+~cs6.1.0-100.16.10+~cs6.1.0-20.16.10+~cs6.1.0-30.16.10+~cs6.1.0-4 Show 6 moreShow less0.16.10+~cs6.1.0-50.16.10+~cs6.1.0-60.16.10+~cs6.1.0-70.16.10+~cs6.1.0-80.16.10+~cs6.1.0-90.16.4+~cs6.1.0-1 |
None known |
node-katexDebian:13 |
before 0.16.10+~cs6.1.0-1 | 0.16.10+~cs6.1.0-1 |
node-katexDebian:14 |
before 0.16.10+~cs6.1.0-1 | 0.16.10+~cs6.1.0-1 |
node-katexUbuntu:Pro:22.04:LTS |
before 0.13.11+~cs6.0.0-2ubuntu0.1~esm1, plus listed versions 0.10.2+dfsg-80.10.2+dfsg-90.10.2+dfsg-100.13.11+~cs6.0.0-2 |
0.13.11+~cs6.0.0-2ubuntu0.1~esm1 |
node-katexUbuntu:Pro:22.04:LTS From an advisory covering 4 CVEs |
before 0.13.11+~cs6.0.0-2ubuntu0.1~esm1, plus listed versions 0.10.2+dfsg-80.10.2+dfsg-90.10.2+dfsg-100.13.11+~cs6.0.0-2 |
0.13.11+~cs6.0.0-2ubuntu0.1~esm1 |
node-katexUbuntu:Pro:24.04:LTS From an advisory covering 4 CVEs |
before 0.16.10+~cs6.1.0-2ubuntu0.24.04.1~esm1, plus listed versions 0.16.4+~cs6.1.0-10.16.10+~cs6.1.0-2 |
0.16.10+~cs6.1.0-2ubuntu0.24.04.1~esm1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2024-28245 is a medium vulnerability (CVSS 6.3) in Katex, published March 25, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.41%, the 35th percentile. Fixed in katex 0.16.10.
References
github.com/KaTeX/KaTeX/security/advisories/GHSA-f98w-7cxr-ff2h
github.com/KaTeX/KaTeX/commit/c5897fcd1f73da9612a53e6b5544f1d776e17770
nvd.nist.gov/vuln/detail/CVE-2024-28245
github.com/advisories/GHSA-f98w-7cxr-ff2h
github.com/CVEProject/cvelistV5/tree/main/cves/2024/28xxx/CVE-2024-28245.json
security-tracker.debian.org/tracker/CVE-2024-28245