Skip to content
OpenAdvisories
Medium USN-7572-1 4 CVEs

node-katex vulnerabilities

Published Jun 17, 2025 · Updated Apr 27, 2026

Summary

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)

Fixed packages 2

ReleasePackageFixed in
Ubuntu · Pro 22.04 LTS Pro:22.04:LTS node-katex 0.13.11+~cs6.0.0-2ubuntu0.1~esm1
Ubuntu · Pro 24.04 LTS Pro:24.04:LTS node-katex 0.16.10+~cs6.1.0-2ubuntu0.24.04.1~esm1

Vulnerabilities 4

  • Medium 6.5

    KaTeX's maxExpand bypassed by \edef

    KaTeX is a JavaScript library for TeX math rendering on the web. KaTeX users who render untrusted mathematical expressions could encounter malicious input using `\edef` that causes a near-infinite loop, despite setting `maxExpand` to avoid such loops. This ca…

  • Medium 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.1…

  • Medium 6.3

    \htmlData does not validate attribute names in KaTeX

    KaTeX is a fast, easy-to-use JavaScript library for TeX math rendering on the web. KaTeX users who render untrusted mathematical expressions with `renderToString` could encounter malicious input using `\htmlData` that runs arbitrary JavaScript, or generate in…

  • Medium 5.5

    KaTeX is missing normalization of the protocol in URLs allows bypassing forbidden protocols

    KaTeX is a JavaScript library for TeX math rendering on the web. Code that uses KaTeX's `trust` option, specifically that provides a function to blacklist certain URL protocols, can be fooled by URLs in malicious inputs that use uppercase characters in the pr…

References

  • report
    https://ubuntu.com/security/CVE-2024-28243
  • report
    https://ubuntu.com/security/CVE-2024-28245
  • report
    https://ubuntu.com/security/CVE-2024-28246
  • report
    https://ubuntu.com/security/CVE-2025-23207