Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

katex

Latest version: v0.19.1

Overview

Last scanned
23 Oct 2026
Published
23 Oct 2026
npm package Publisher: edemaine, gagern, kevinbarabash, khanacademy, sophiebits, xymostech, ylemkimon
20,468 Stars
1,343 Forks
11 Versions
114.2M Downloads
TypeScript Repo language

Scan summary

katex was last scanned on 23 Oct 2026 at version 0.19.1. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 11 versions; the latest was published on 23 Oct 2026.
  • Findings: No rules fired in version 0.19.1.
  • Downloads: 114,158,030 downloads.

Versions

11 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.19.1 LATEST 23 Oct 2026 No rules fired
0.19.0 1 Oct 2026 No rules fired
0.18.11 1 Oct 2026 No rules fired
0.18.10 30 Sep 2026 Not shown
0.18.9 23 Sep 2026 Not shown

No rules fired in 0.19.1

Findings

Findings for v0.19.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.19.1; other versions have their own rules, not their own score.

Known vulnerabilities

6 CVEs · last 1 Oct 2026

0 CRITICAL 1 HIGH 4 MEDIUM 1 LOW

Versions

  • ≥ 0.18.2
  • ≥ 0.16.21, < 0.18.2 1 LOW
  • ≥ 0.16.10, < 0.16.21 1 HIGH 1 LOW
  • ≥ 0.15.4, < 0.16.10 1 HIGH 4 MEDIUM 1 LOW
  • ≥ 0.12.0, < 0.15.4 1 HIGH 3 MEDIUM 1 LOW
  • ≥ 0.11.0, < 0.12.0 2 MEDIUM 1 LOW
  • < 0.11.0

Vulnerabilities

  • CVE-2026-103923 Low 1 Oct 2026 katex: katex: Cross-site scripting via prototype pollution inheritance Fixed in 0.18.2
  • CVE-2025-23207 High 17 Jan 2025 katex: \htmlData does not validate attribute names in KaTeX Fixed in 0.16.21
  • CVE-2024-28246 Medium 25 Mar 2024 KaTeX is a JavaScript library for TeX math rendering on the web. Code ... Fixed in 0.16.10
  • CVE-2024-28245 Medium 25 Mar 2024 KaTeX is a JavaScript library for TeX math rendering on the web. KaTeX ... Fixed in 0.16.10
  • CVE-2024-28244 Medium 25 Mar 2024 KaTeX is a JavaScript library for TeX math rendering on the web. KaTeX ... Fixed in 0.16.10
  • CVE-2024-28243 Medium 25 Mar 2024 KaTeX is a JavaScript library for TeX math rendering on the web. KaTeX ... Fixed in 0.16.10

README

The publisher’s own README, as collected from the registry.

npm semantic-release CI Discussions Gitpod ready-to-code

KaTeX is a fast, easy-to-use JavaScript library for TeX math rendering on the web.

  • Fast: KaTeX renders its math synchronously and doesn't need to reflow the page. See how it compares to a competitor in this speed test.
  • Print quality: KaTeX's layout is based on Donald Knuth's TeX, the gold standard for math typesetting.
  • Self contained: KaTeX has no dependencies and can easily be bundled with your website resources.
  • Server side rendering: KaTeX produces the same output regardless of browser or environment, so you can pre-render expressions using Node.js and send them as plain HTML.

KaTeX is compatible with all major browsers, including Chrome, Safari, Firefox, Opera, and Edge.

KaTeX supports much (but not all) of LaTeX and many LaTeX packages. See the list of supported functions.

Try out KaTeX on the demo page!

Getting started

Starter template
<!DOCTYPE html>
<!-- KaTeX requires the use of the HTML5 doctype. Without it, KaTeX may not render properly -->
<html>
  <head>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.19.1/dist/katex.min.css" integrity="sha384-WwGtaC6ywCHxA5cstpj/3+xIZvTez8dq2IcBQaXRkenHZ7FVVq1ZROtURwfbtTlG" crossorigin="anonymous">

    <!-- The loading of KaTeX is deferred to speed up page rendering -->
    <script defer src="https://cdn.jsdelivr.net/npm/katex@0.19.1/dist/katex.min.js" integrity="sha384-a1WQdjRj162i159OYq041X6I4K8NenkrI09LlPmiHg0YOb7CR+wJOraXwK9abpnE" crossorigin="anonymous"></script>

    <!-- To automatically render math in text elements, include the auto-render extension: -->
    <script defer src="https://cdn.jsdelivr.net/npm/katex@0.19.1/dist/contrib/auto-render.min.js" integrity="sha384-bjyGPfbij8/NDKJhSGZNP/khQVgtHUE5exjm4Ydllo42FwIgYsdLO2lXGmRBf5Mz" crossorigin="anonymous"
        onload="renderMathInElement(document.body);"></script>
  </head>
  ...
</html>

You can also download KaTeX and host it yourself.

For details on how to configure auto-render extension, refer to the documentation.

API

Call katex.render to render a TeX expression directly into a DOM element. For example:

katex.render("c = \\pm\\sqrt{a^2 + b^2}", element, {
    throwOnError: false
});

Call katex.renderToString to generate an HTML string of the rendered math, e.g., for server-side rendering. For example:

var html = katex.renderToString("c = \\pm\\sqrt{a^2 + b^2}", {
    throwOnError: false
});
// '<span class="katex">...</span>'

Make sure to include the CSS and font files in both cases. If you are doing all rendering on the server, there is no need to include the JavaScript on the client.

The examples above use the throwOnError: false option, which renders invalid inputs as the TeX source code in red (by default), with the error message as hover text. For other available options, see the API documentation, options documentation, and handling errors documentation.

Demo and Documentation

Learn more about using KaTeX on the website!

Contributors

Code Contributors

This project exists thanks to all the people who contribute code. If you'd like to help, see our guide to contributing code.

Financial Contributors

Become a financial contributor and help us sustain our community.

Individuals
Organizations

Support this project with your organization. Your logo will show up here with a link to your website.

License

KaTeX is licensed under the MIT License.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm katex

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Frame 2085668439 (1)
Group 1261154229