Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. mistune
  4. ›
  5. CVE-2026-44896

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

May 8, 2026

In src/mistune/directives/image.py, the render_figure() function concatenates figclass and figwidth options directly into HTML attributes without escaping (lines 152-168).

This allows attribute injection and XSS even when HTMLRenderer(escape=True) is used, because these values bypass the inline renderer.

Other attributes in the same file (src, alt, style) are properly escaped; figclass/figwidth were missed.

References

  • github.com/advisories/GHSA-58cw-g322-p94v
  • github.com/lepture/mistune
  • github.com/lepture/mistune/security/advisories/GHSA-58cw-g322-p94v
  • nvd.nist.gov/vuln/detail/CVE-2026-44896

Code Behaviors & Features

Detect and mitigate CVE-2026-44896 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions up to 3.2.0

Solution

Unfortunately, there is no solution available yet.

Impact 5.4 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

pypi/mistune/CVE-2026-44896.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 09 May 2026 00:20:38 +0000.