CVE-2026-44708
Analyzed Analyzed - Analysis Complete
Math Plugin XSS in Mistune Markdown Parser

Publication date: 2026-05-26

Last updated on: 2026-05-28

Assigner: GitHub, Inc.

Description
Mistune is a Python Markdown parser with renderers and plugins. Prior to 3.2.1, the mistune math plugin renders inline math ($...$) and block math ($$...$$) by concatenating the raw user-supplied content directly into the HTML output without any HTML escaping. This occurs even when the parser is explicitly created with escape=True, which is supposed to guarantee that all user-controlled text is sanitised before reaching the DOM. This vulnerability is fixed in 3.2.1.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-05-26
Last Modified
2026-05-28
Generated
2026-06-16
AI Q&A
2026-05-27
EPSS Evaluated
2026-06-14
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
mistune_project mistune to 3.2.1 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-79 The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Mitigation Strategies

To mitigate this vulnerability, you should upgrade the mistune package to version 3.2.1 or later, where the issue is fixed.

Executive Summary

This vulnerability exists in the Mistune Python Markdown parser's math plugin before version 3.2.1. The plugin renders inline math ($...$) and block math ($$...$$) by directly inserting the raw user-supplied content into the HTML output without performing any HTML escaping. This means that even if the parser is configured with escape=True, which is intended to sanitize all user input before it reaches the DOM, the math plugin bypasses this protection. As a result, malicious content can be injected into the HTML output.

Impact Analysis

This vulnerability can lead to cross-site scripting (XSS) attacks because user-supplied content is inserted into HTML without proper escaping. An attacker could exploit this by injecting malicious scripts into the math expressions, which would then be executed in the context of the victim's browser. This can compromise the confidentiality and integrity of user data, potentially leading to unauthorized actions or data theft.

Detection Guidance

This vulnerability can be detected by identifying if your system is using the Mistune Markdown parser with the math plugin in versions prior to 3.2.1, especially if the parser is configured with escape=True but still renders inline math ($...$) or block math ($$...$$) without proper HTML escaping.

To detect exploitation attempts or vulnerable usage, you can search for markdown content or logs containing suspicious inline or block math expressions that include potentially malicious HTML or script tags, such as payloads like `$<script>alert(document.cookie)</script>$` or `$$<img src=x onerror="alert(document.cookie)">$$`.

Suggested commands to detect vulnerable versions or suspicious payloads include:

  • Check the installed Mistune version (Python environment): ```bash pip show mistune ```
  • Search application source code or dependencies for Mistune version usage:
  • Scan logs or markdown files for suspicious math plugin payloads (example using grep): ```bash grep -r --include='*.md' '\$<script' /path/to/markdown/files ```
  • Monitor web traffic or application logs for requests containing suspicious inline or block math expressions with embedded scripts or HTML tags.
Compliance Impact

This vulnerability allows unescaped user-supplied content to be directly included in HTML output, which can lead to cross-site scripting (XSS) attacks. Such vulnerabilities can compromise the confidentiality and integrity of user data.

Non-compliance with data protection standards like GDPR or HIPAA can occur if personal or sensitive data is exposed or manipulated due to this vulnerability, as these regulations require appropriate safeguards against unauthorized data access or alteration.

Therefore, systems using vulnerable versions of Mistune's math plugin may face increased risk of violating these compliance requirements until the vulnerability is fixed.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-44708. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart