| Package | Affected versions | Patched versions |
|---|---|---|
| mistune | < 3.2.1 | 3.2.1 |
| mistune | ≤ 3.2.0 |
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.
Running one of these products? Scan your site to see whether it exposes a vulnerable version.
Scan my site free