# CVE-2026-44708: Mistune math plugin XSS bypass in Markdown rendering

Source: https://junglewise.ai/threats/cve-2026-44708-mistune-math-plugin-xss-bypass-in-markdown-rendering  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-26. Updated: 2026-05-26  
License: CC BY 4.0 with a link back

CVE-2026-44708 · Severity: medium · CVSS 6.1 · Published 2026-05-26

Mistune is a Python library used to convert Markdown text into HTML. A security flaw in its math plugin allows malicious users to bypass safety filters and inject harmful scripts into web pages. This could lead to unauthorized actions being performed in a user's browser, such as stealing session cookies or redirecting users to malicious sites.

Technologies: [mistune (PyPI)](https://junglewise.ai/threats/technologies/mistune). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-44708 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-44708 being exploited in the wild.

**How severe is CVE-2026-44708?** Medium severity, with a CVSS score of 6.1, published 26 May 2026.

**Which products and versions are affected?** mistune (PyPI) <= 3.2.0, ECOSYSTEM:introduced=0,fixed=3.2.1, ECOSYSTEM:introduced=0,last_affected=3.2.0.

**Is there a fix for CVE-2026-44708?** Yes. mistune (PyPI): upgrade to 3.2.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-44708 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-44708?** Check whether you run mistune (PyPI) 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

- mistune (PyPI): upgrade to 3.2.1 or later

  ```sh
  pip install "mistune>=3.2.1"
  ```


## Technical details

A Cross-Site Scripting (XSS) vulnerability exists in the Mistune math plugin due to improper neutralization of input during HTML generation. The 'render_inline_math' and 'render_block_math' functions in 'src/mistune/plugins/math.py' concatenate raw user-supplied text directly into the HTML output without calling sanitization helpers or checking the renderer's '_escape' flag. This allows an attacker to bypass the 'escape=True' security configuration by wrapping malicious HTML/JavaScript inside math delimiters ($...$ or $$...$$). The vulnerability is fixed in version 3.2.1 by ensuring math content is properly escaped.

## Affected products

- lepture mistune < 3.2.1

## Identifiers

- CVE-2026-44708
- GHSA-8g87-j6q8-g93x
- PYSEC-2026-2206

## Timeline

- 2026-05-03: patched: Version 3.2.1 released with fixes for math escaping.
- 2026-05-06: advisory: GitHub Security Advisory GHSA-8g87-j6q8-g93x published.
- 2026-05-26: disclosed: CVE-2026-44708 published to the NVD.

## References

- [https://github.com/lepture/mistune/releases/tag/v3.2.1](https://github.com/lepture/mistune/releases/tag/v3.2.1)
- [https://github.com/lepture/mistune/security/advisories/GHSA-8g87-j6q8-g93x](https://github.com/lepture/mistune/security/advisories/GHSA-8g87-j6q8-g93x)

## Related threats

- [Mistune path traversal and XSS in Include directive](https://junglewise.ai/threats/duplicate-advisory-mistune-path-traversal-and-xss-in-include-directive-bf25c187)
- [Mistune path traversal and XSS in Include directive](https://junglewise.ai/threats/cve-2026-115355-mistune-before-3-3-0-contains-a-path-traversal-vulnerability-in)
- [Mistune uncontrolled recursion in HTML rendering](https://junglewise.ai/threats/cve-2026-76098-mistune-uncontrolled-recursion-in-html-rendering)
- [lepture Mistune predictable ID generation in TOC plugin](https://junglewise.ai/threats/cve-2026-59930-lepture-mistune-predictable-id-generation-in-toc-plugin)
- [lepture mistune XSS via incomplete URL scheme filtering in HTML renderer](https://junglewise.ai/threats/cve-2026-59929-lepture-mistune-xss-via-incomplete-url-scheme-filtering-in-html)
