# MathLive XSS vulnerability in HTML escaping

Source: https://junglewise.ai/threats/mathlive-xss-vulnerability-in-html-escaping-b78bd139  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2025-04-01. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

Severity: low · CVSS 3.1 · Published 2025-04-01

MathLive is a JavaScript library for rendering mathematical expressions in web applications. A cross-site scripting (XSS) vulnerability in versions prior to 0.104.0 allows attackers to inject and execute arbitrary code through improperly escaped HTML, potentially compromising user sessions, stealing data, or defacing content displayed to end users.

Technologies: [mathlive (npm)](https://junglewise.ai/threats/technologies/mathlive). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** Low severity, with a CVSS score of 3.1, published 1 April 2025.

**Which products and versions are affected?** mathlive (npm) SEMVER:introduced=0,fixed=0.104.0.

**Is there a fix for This vulnerability?** Yes. mathlive (npm): upgrade to 0.104.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is This vulnerability attacked?** It is attacked over the network, in a software library.

**Am I affected?** Check whether you run mathlive (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- mathlive (npm): upgrade to 0.104.0 or later

  ```sh
  npm install mathlive@0.104.0
  ```


## Technical details

This is a cross-site scripting (CWE-79) vulnerability caused by insufficient HTML escaping in the MathLive library's handling of HTML content, specifically in the \htmlData function. The vulnerable component fails to properly sanitize or escape user-controlled input before rendering it in the DOM, allowing an attacker to inject malicious JavaScript. The attack vector is network-based and does not require authentication or user interaction beyond viewing affected content. An attacker can execute arbitrary JavaScript in the context of the affected web application, potentially stealing credentials, session tokens, or sensitive user data. The vulnerability has been fixed in version 0.104.0.

## Affected products

- Arno Gourdol MathLive before 0.104.0

## Timeline

- 2025-04-01: disclosed
- 2025-01-18: patched: Fix committed to address XSS in \htmlData function
- 2025-04-02: other: Advisory withdrawn as duplicate of GHSA-qwj6-q94f-8425

## References

- [https://github.com/arnog/mathlive/commit/abc26056fd5e29a99edfa96a0bbe855ea2a8b678](https://github.com/arnog/mathlive/commit/abc26056fd5e29a99edfa96a0bbe855ea2a8b678)

## Related threats

- [Arno Gourdol MathLive XSS in text-mode rendering](https://junglewise.ai/threats/cve-2026-54705-arno-gourdol-mathlive-xss-in-text-mode-rendering)
- [MathLive HTML escaping vulnerability in \htmlData command](https://junglewise.ai/threats/cve-2025-29049-mathlive-html-escaping-vulnerability-in-htmldata-command)
