Vulnerability · Published May 26, 2026 · Assigned by GitHub_M
CVE-2026-44899Mistune Image Directive CSS Injection Vulnerability
Medium 4.7
In plain English
A medium-severity cross-site scripting in mistune from lepture. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 14% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Mistune is a Python Markdown parser with renderers and plugins. Prior to 3.2.1, the Image directive plugin validates the :width: and :height: options with a regex compiled as _num_re = re.compile(r"^\d+(?:\.\d*)?"). When the validated value is not a plain integer, render_block_image() inserts it directly into a style="width:...;" or style="height:...;" attribute. Because the value was accepted by the prefix-only regex, any CSS after the leading digits reaches the style= attribute verbatim and without escaping. This vulnerability is fixed in 3.2.1.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | mistune | no fix listed | DEBIAN-CVE-2026-44899 |
| Debian:13 | mistune | no fix listed | DEBIAN-CVE-2026-44899 |
| Debian:14 | mistune | no fix listed | DEBIAN-CVE-2026-44899 |
| PyPI | mistune | 3.2.1 | GHSA-ccfx-mfmx-2fx9 |
| PyPI | mistune | 3.2.1 | PYSEC-2026-2209 |
| Ubuntu:22.04:LTS | mistune | no fix listed | UBUNTU-CVE-2026-44899 |
| Ubuntu:24.04:LTS | mistune | no fix listed | UBUNTU-CVE-2026-44899 |
| Ubuntu:25.10 | mistune | no fix listed | UBUNTU-CVE-2026-44899 |
| Ubuntu:26.04:LTS | mistune | no fix listed | UBUNTU-CVE-2026-44899 |
| Ubuntu:26.10 | mistune | no fix listed | UBUNTU-CVE-2026-44899 |
| Ubuntu:22.04:LTS | mistune0 | no fix listed | UBUNTU-CVE-2026-44899 |
| Ubuntu:24.04:LTS | mistune0 | no fix listed | UBUNTU-CVE-2026-44899 |
| Ubuntu:25.10 | mistune0 | no fix listed | UBUNTU-CVE-2026-44899 |
| Ubuntu:26.04:LTS | mistune0 | no fix listed | UBUNTU-CVE-2026-44899 |
| Ubuntu:26.10 | mistune0 | no fix listed | UBUNTU-CVE-2026-44899 |
Affected products (as reported)
Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N
References
- https://github.com/lepture/mistune/security/advisories/GHSA-ccfx-mfmx-2fx9 x_refsource_CONFIRM
- https://github.com/lepture/mistune/releases/tag/v3.2.1 x_refsource_MISC