Mistune Image Directive CSS Injection Vulnerability
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Partial Red Hat: 2 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-79.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| lepture | mistune | before 3.2.1 | 3.2.1 | Patch available | CNA |
| — | mistune (PyPI) | 3.2.0 to before 3.2.1 | 3.2.1 | Patch available | GHSA-ccfx-mfmx-2fx9 |
- mistune Vendorlepture Affected before 3.2.1 Fixed in 3.2.1 Patch available CNA
- mistune (PyPI) Vendor— Affected 3.2.0 to before 3.2.1 Fixed in 3.2.1 Patch available GHSA-ccfx-mfmx-2fx9
Remediation
- Fix · CNA mistune (lepture) Fixed in 3.2.1
- Fix · GHSA-ccfx-mfmx-2fx9 mistune (PyPI) Fixed in 3.2.1 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Migration Toolkit for Applications 8 | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift AI (RHOAI) | Affected | No fix yet: Fix deferred |
Not affected: 2 products
- Red Hat OpenShift Container Platform 4
- Red Hat Satellite 6
Timeline
- 2026-10-02 Threatist record created from CVE-2026-44899
- 2026-10-03 Alias added: GHSA-ccfx-mfmx-2fx9
References
More lepture Mistune vulnerabilities
- TI-2026-42736 Mistune block_parser: quadratic-time parsing on long lists of repeated reference-link definitions CVSS 3.1HIGH 7.5
- TI-2026-42730 Regular expression denial of service in lepture mistune CVSS 3.1HIGH 7.5
- TI-2026-42731 Mistune: XSS via percent-encoded javascript URI bypass in safe_url() CVSS 3.1MEDIUM 6.1
- TI-2026-32773 Mistune TOC Anchor Injection XSS CVSS 3.1MEDIUM 6.1
- TI-2026-32595 Mistune Math Plugin XSS Escape Bypass CVSS 3.1MEDIUM 6.1
- TI-2026-42738 Insufficient verification of data authenticity in lepture mistune CVSS 3.1MEDIUM 4.3
Sources
- CVE-2026-44899 · CVE Program
- CVE-2026-44899 · NVD
- FIRST EPSS
- GHSA-ccfx-mfmx-2fx9 · GitHub Advisory Database · CC BY 4.0
- CVE-2026-44899 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences