Description
Mistune from 3.2.1 before 3.3.0 contains a CSS injection vulnerability that allows attackers controlling markdown input to inject arbitrary style declarations via the unvalidated figwidth option of the figure directive. Attackers can append declarations like background:url() to the rendered figure style attribute, forcing victim browsers to send requests to attacker servers and leak attribute values.
Published: 2026-10-22
Score: 5.3 Medium
EPSS: n/a
KEV: No
Impact: CSS Injection exposing data via injected style rules
Action: Apply Patch
AI Analysis

Impact

Mistune 3.2.1 up to just before 3.3.0 contains a flaw that lets an attacker supply arbitrary markdown and inject CSS through the unvalidated figwidth option of the figure directive. The injected CSS can include statements such as background:url(), causing a victim browser to request a resource from an attacker‑controlled domain and potentially revealing existing style attribute values. This mechanism does not execute arbitrary code but can leak data or trigger unintended external requests.

Affected Systems

All Mistune releases from 3.2.1 to the latest patch before 3.3.0 are affected because they contain the unvalidated figwidth option. Versions 3.3.0 and later incorporate a fix that validates or removes this option, eliminating the vulnerability.

Risk and Exploitability

The CVSS score of 5.3 indicates moderate severity. The EPSS score is not available and the CAF is not listed in the CISA KEV catalog, so the probability of real‑world exploitation is unknown. The likely attack vector is when an application accepts user‑supplied markdown content; based on the description, it is inferred that the attacker must be able to control the markdown input. If this condition is met, an attacker can inject malicious CSS that may exfiltrate data or trigger unintended external requests, with a higher risk in public or content‑management systems that expose the figure directive to users.

Generated by OpenCVE AI on October 23, 2026 at 04:19 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Mistune to version 3.3.0 or later, which removes the vulnerable figwidth option.
  • If upgrading is not feasible, disable the figure directive entirely or strip any figwidth attribute from the markdown before rendering.
  • Sanitize or escape any CSS values supplied through figwidth, ensuring that only safe, non‑referential styles are inserted into the figure’s style attribute.

Generated by OpenCVE AI on October 23, 2026 at 04:19 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 23 Oct 2026 04:00:00 +0000

Type Values Removed Values Added
First Time appeared Lepture
Lepture mistune
Vendors & Products Lepture
Lepture mistune

Fri, 23 Oct 2026 00:45:00 +0000

Type Values Removed Values Added
Description Mistune from 3.2.1 before 3.3.0 contains a CSS injection vulnerability that allows attackers controlling markdown input to inject arbitrary style declarations via the unvalidated figwidth option of the figure directive. Attackers can append declarations like background:url() to the rendered figure style attribute, forcing victim browsers to send requests to attacker servers and leak attribute values.
Title Mistune 3.2.1 before 3.3.0 CSS Injection via Figure Directive figwidth Option
First Time appeared Mistune Project
Mistune Project mistune
Weaknesses CWE-94
CPEs cpe:2.3:a:mistune_project:mistune:*:*:*:*:*:*:*:*
Vendors & Products Mistune Project
Mistune Project mistune
References
Metrics cvssV3_1

{'score': 4.7, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N'}

cvssV4_0

{'score': 5.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N'}


Subscriptions

Lepture Mistune
Mistune Project Mistune
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-10-22T19:13:27.678Z

Reserved: 2026-10-22T11:20:02.626Z

Link: CVE-2026-115351

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Deferred

Published: 2026-10-22T19:17:40.920

Modified: 2026-10-22T19:17:41.033

Link: CVE-2026-115351

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-23T04:30:04Z

Weaknesses
  • CWE-94

    Improper Control of Generation of Code ('Code Injection')