# CVE-2026-44899: Mistune Image Directive CSS Injection Vulnerability

- Severity: Medium 4.7 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.23%, higher than 14% of CVEs (2026-12-02)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-05-14T16:36:18.000Z
- Modified: 2026-07-24T11:10:00.170Z
- Also known as: GHSA-ccfx-mfmx-2fx9, PYSEC-2026-2209
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- lepture mistune: < 3.2.1
- mistune (PyPI): from 3.2.0 before 3.2.1; before 3.2.1
- mistune_project mistune: before 3.2.1

## Every score

- GitHub_M: CVSS:3.1 4.7 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N`
- GitHub: CVSS:3.1 4.7 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- PyPA Advisory Database: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/lepture/mistune/security/advisories/GHSA-ccfx-mfmx-2fx9> (exploit, evidence, vendor-advisory, web)
- <https://github.com/lepture/mistune/releases/tag/v3.2.1> (advisory, product, release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-44899> (advisory)
- <https://github.com/lepture/mistune> (package)

## Sources

- CVE List: [CVE-2026-44899](https://www.cve.org/CVERecord?id=CVE-2026-44899), CVE Terms of Use, modified 2026-05-27
- GitHub Advisory Database: [GHSA-ccfx-mfmx-2fx9](https://github.com/advisories/GHSA-ccfx-mfmx-2fx9), CC-BY-4.0, modified 2026-07-13
- NVD: [CVE-2026-44899](https://nvd.nist.gov/vuln/detail/CVE-2026-44899), Public domain, modified 2026-07-24
- PyPA Advisory Database: [PYSEC-2026-2209](https://osv.dev/vulnerability/PYSEC-2026-2209), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-44899 · Whole record: https://cve.day/CVE-2026-44899.json · Rebuilt by cve.day 2026-11-25T22:59:22.385Z
