{"id":"CVE-2026-44896","aliases":["CVE-2026-44896","GHSA-58cw-g322-p94v","PYSEC-2026-168"],"related":[],"kind":"vulnerability","state":"published","title":"Mistune: XSS via unescaped figclass/figwidth in Figure directive","summary":"Mistune is a Python Markdown parser with renderers and plugins. In 3.2.0 and earlier, in src/mistune/directives/image.py, the render_figure() function concatenates figclass and figwidth options directly into HTML attributes without escaping. This allows attribute injection and XSS even when HTMLRenderer(escape=True) is used, because these values bypass the inline renderer. Version 3.2.1 contains a patch.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Mistune is a Python Markdown parser with renderers and plugins. In 3.2.0 and earlier, in src/mistune/directives/image.py, the render_figure() function concatenates figclass and figwidth options directly into HTML attributes without escaping. This allows attribute injection and XSS even when HTMLRenderer(escape=True) is used, because these values bypass the inline renderer. Version 3.2.1 contains a patch.","source":"cvelist"},{"lang":"en","text":"In `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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Mistune es un analizador de Markdown de Python con renderizadores y complementos. En 3.2.0 y versiones anteriores, en src/mistune/directives/image.py, la función render_figure() concatena las opciones figclass y figwidth directamente en atributos HTML sin escapar. Esto permite la inyección de atributos y XSS incluso cuando se utiliza HTMLRenderer(escape=True), porque estos valores eluden el renderizador en línea.","source":"nvd"},{"lang":"en","text":"Mistune is a Python Markdown parser with renderers and plugins. In 3.2.0 and realier, in src/mistune/directives/image.py, the render_figure() function concatenates figclass and figwidth options directly into HTML attributes without escaping. This allows attribute injection and XSS even when HTMLRenderer(escape=True) is used, because these values bypass the inline renderer.","format":"markdown","source":"pysec"}],"published":"2026-05-08T23:43:12.000Z","modified":"2026-09-10T03:51:04.581Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"< 3.2.1","status":"affected"}],"vendor":"lepture","product":"mistune","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.2.1"}],"ecosystem":"PyPI","package":"mistune","purl":"pkg:pypi/mistune","source":"ghsa"},{"ranges":[{"status":"affected","lastAffected":"3.2.0"}],"vendor":"mistune_project","product":"mistune","cpe":"cpe:2.3:a:mistune_project:mistune:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.2.1"}],"ecosystem":"PyPI","package":"mistune","purl":"pkg:pypi/mistune","source":"pysec"}],"references":[{"url":"https://github.com/lepture/mistune/security/advisories/GHSA-58cw-g322-p94v","tags":["advisory","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/lepture/mistune/commit/a3cb6e5655308797e8be021d6c7b5bab13cbace2","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44896","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/lepture/mistune","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/mistune/PYSEC-2026-168.yaml","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-05-27T13:06:28.976Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-44896","url":"https://www.cve.org/CVERecord?id=CVE-2026-44896","licence":"CVE Terms of Use","modified":"2026-06-08T23:34:02.448Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-58cw-g322-p94v","url":"https://github.com/advisories/GHSA-58cw-g322-p94v","licence":"CC-BY-4.0","modified":"2026-09-10T03:51:04.581Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-44896","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44896","licence":"Public domain","modified":"2026-07-24T11:10:00.170Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-168","url":"https://osv.dev/vulnerability/PYSEC-2026-168","licence":"CC-BY-4.0","modified":"2026-05-29T12:15:04.995Z"}],"updatedAt":"2026-11-25T22:59:22.383Z","epss":{"score":0.00198,"percentile":0.10102,"date":"2026-12-01T12:00:22.000Z"}}