{"id":"CVE-2026-44896","aliases":["GHSA-58cw-g322-p94v","PYSEC-2026-168"],"title":"Mistune has XSS via unescaped figclass/figwidth in Figure directive","summary":"Mistune has XSS via unescaped figclass/figwidth in Figure directive","severity":"medium","cvss":6.1,"cvssVector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","vendor":"mistune","product":"mistune","ecosystem":"pip","affected":["mistune < 3.2.1"],"patched":["mistune 3.2.1"],"published":"2026-05-08","updated":"2026-09-10","sourceUpdated":"2026-09-10T03:51:04.581184293Z","source":"OSV","sourceUrl":"https://osv.dev/vulnerability/GHSA-58cw-g322-p94v","references":[{"url":"https://github.com/lepture/mistune/security/advisories/GHSA-58cw-g322-p94v"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44896"},{"url":"https://github.com/lepture/mistune/commit/a3cb6e5655308797e8be021d6c7b5bab13cbace2"},{"url":"https://github.com/lepture/mistune"},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/mistune/PYSEC-2026-168.yaml"}],"tags":["osv","pip"],"epss":0.00198,"epssPercentile":0.09906,"ingestedAt":"2026-09-12T03:13:01.659Z","slug":"CVE-2026-44896","body":"## Overview\n\nIn `src/mistune/directives/image.py`, the `render_figure()` function concatenates `figclass` and `figwidth` options directly into HTML attributes without escaping (lines 152-168).\n\nThis allows attribute injection and XSS even when `HTMLRenderer(escape=True)` is used, because these values bypass the inline renderer.\n\nOther attributes in the same file (src, alt, style) are properly escaped; figclass/figwidth were missed.\n\n## Affected packages\n\n- `mistune < 3.2.1`\n\n## Remediation\n\nUpgrade to a patched release:\n\n- `mistune 3.2.1`","depth":"sunlit","depthScore":34,"depthScoreParts":{"impact":33.6,"likelihood":0,"exploitation":0,"ransomware":0},"changes":[]}