Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit Markdown payload with active HTML
-
DeliveryPayload stored/passed to mr.Markdown
-
Exploitpython-markdown emits raw HTML unsanitized
-
Executionipywidgets.HTML writes value via innerHTML
-
ImpactVictim views app, script executes in browser
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires a Mercury application (versions 3.0.0 through 3.2.10) that passes attacker-controllable data into the mr.Markdown widget - specifically database rows, user form submissions, uploaded file contents, or external/LLM API responses rendered as Markdown; the prior mr.Message markdown path is affected by the same unsanitized renderer. The malicious payload is active HTML such as event-handler attributes (onerror/onload) or javascript: links. Exploitation is LIMITED by required user interaction (UI:R): a second user must view the app containing the injected content for the script to run in their browser. It does NOT affect apps that render only trusted, author-written Markdown, and it is neutralized in 3.2.11 (which sanitizes by default unless the developer explicitly opts in with unsafe_allow_html=True). |
| Impact | This is a stored/DOM-based XSS (CWE-79) in the mr.Markdown rendering sink of the Mercury framework, with an input CVSS of 6.1 (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N). The signals point to a moderate, conditional risk rather than a drop-everything priority. No EPSS score was provided in the input, no CISA KEV listing is present, and no public proof-of-concept is referenced - so exploitation is: no public exploit identified at time of analysis. No SSVC decision data was supplied. The CVSS vector indicates network vector, low complexity, no privileges (PR:N) and required user interaction (UI:R), which aligns with the description: code executes 'when another user views the application.' The one important nuance is that this is not a flaw that fires against a stock install - it only becomes exploitable when a Mercury app is built to pass untrusted data (DB rows, user submissions, uploaded files, or LLM/API responses) into mr.Markdown. The advisory explicitly frames it as a library sink that fails to neutralize output and is triggered by 'ordinary, reasonable application code,' which raises real-world likelihood among apps that render user- or AI-supplied content, but leaves apps that render only trusted author content unaffected. Net: a legitimate issue worth patching, but its real-world severity is gated by application design, and the absence of KEV/POC/EPSS signals suggests no evidence of active or widespread exploitation. |
| Exploit ScenarioDerived | A developer builds a Mercury app (e.g., a dashboard or chat/LLM front-end) that feeds user submissions, uploaded file contents, or an LLM API response into mr.Markdown. An attacker submits Markdown containing active HTML such as '<img src=x onerror=...>' or '<svg onload=...>'; because python-markdown passes raw HTML through and the ipywidgets.HTML widget writes it to the DOM via innerHTML unsanitized, the payload executes in the browser of any other user who later views the app. No public exploit code is referenced, but the payloads named in the advisory are trivial to construct. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 19, 2026
Stored/DOM cross-site scripting in Mercury's mr.Markdown widget (versions 3.0.0 through 3.2.10) allows attacker-supplied Markdown containing raw HTML event handlers or javascript: links to execute in the browser of any user who views the affected dashboard. The widget converts Markdown with python-markdown, which passes raw HTML through, and then renders it into an ipywidgets.HTML sink via innerHTML without sanitization, so untrusted database rows, form submissions, uploaded files, or LLM/API responses can become script execution; the prior mr.Message markdown path uses the same unsafe renderer. Exploitation is unauthenticated per the CVSS vector (PR:N) but requires a victim to view the application (UI:R), and no public exploit code was identified at time of analysis. Mercury 3.2.11 fixes the issue by sanitizing rendered Markdown by default and requiring an explicit unsafe_allow_html=True opt-in for trusted content.
RemediationAI
Vendor-released patch: Mercury 3.2.11 (upgrade pip package mercury to >=3.2.11; advisory https://github.com/mljar/mercury/security/advisories/GHSA-2658-85cv-9wwq, fix commit https://github.com/mljar/mercury/commit/c798a85924e6614c6fea7afe5a560e4554a1d09b, release https://github.com/mljar/mercury/releases/tag/v3.2.11). In 3.2.11 Markdown is sanitized by default and custom HTML/JavaScript is only possible through an explicit unsafe_allow_html=True opt-in, so audit any application code that sets that flag and remove it for user messages, uploaded files, and LLM/API responses. If immediate upgrading is not possible, stop passing untrusted data to mr.Markdown or mr.Message Markdown; pre-sanitize any attacker-influenced string with an allowlist HTML sanitizer such as nh3 or bleach configured to strip event-handler attributes, script/style elements, and javascript: URLs before assignment, and note that this may strip legitimate custom HTML styling that the application relies on. Use the widget's .text update path rather than assigning raw Markdown to .value where applicable, restrict the set of users or data sources that can populate dashboard widgets, and consider a Content-Security-Policy on the Mercury deployment to reduce inline-script execution; a CSP may break Jupyter/ipywidgets functionality and requires testing. Do not enable unsafe_allow_html=True as a workaround, since it restores the raw-HTML sink; also note that Mercury's notebook sanitizers address runtime metadata and saved outputs only and are not XSS mitigations, and that the default 3.2.11 renderer does not provide math typesetting or code syntax highlighting.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause is CWE-79 cross-site scripting arising from two compounding neutralization failures in Mercury's rendering pipeline. In mercury/md.py, MarkdownWidget._to_html() calls python-markdown, which by default passes raw HTML through unchanged, so payloads such as <img src=x onerror=...>, <svg onload=...>, and javascript: links survive conversion; there is no bleach/nh3 allowlist in the package, and the regex-based _apply_inline_theme() only injects style attributes rather than removing dangerous markup. The second failure is the sink: MarkdownWidget subclasses ipywidgets.HTML, whose value is written into the page as raw HTML via innerHTML with no sanitization, which is the widget's design. The notebook_sanitize.py runtime helper and the lab save.ts sanitizer address notebook metadata and saved code-cell outputs only; they do not neutralize HTML/JS and do not touch widget values or Markdown source, so they should not be mistaken for XSS defenses. The patch replaces the ad-hoc regex styling with an HTMLParser-based _InlineStyleParser that styles actual elements rather than tag-like text in attribute values, adds a shared render_markdown() path, and introduces unsafe_allow_html flags on mr.Markdown and mr.Message. The changed scope (S:C) in the CVSS vector reflects that injected script executes in the victim's browser within the origin/context of the Mercury application, with low confidentiality and integrity impact and no availability impact.
Know when Mercury 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
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Unauthenticated attacker can supply untrusted data (PR:N) but a victim must view the app (UI:R); script runs cross-context in the victim browser (S:C) with limited C/I and no availability impact, matching a stored/DOM XSS.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
Mercury is a Python framework for sharing Jupyter notebooks as web applications and dashboards. From 3.0.0 until 3.2.11, mr.Markdown converts attacker-controlled Markdown to HTML without sanitizing raw HTML before assigning it to an ipywidgets.HTML sink. Event-handler attributes and other active HTML can therefore reach the DOM and execute when another user views the application. This issue is fixed in version 3.2.11.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Unauthenticated remote command execution is possible in MLJAR Mercury 3.0.0 through 3.2.3 because a missing comma in the
Unauthenticated remote code execution in MLJAR Mercury deployments running the default tokenless configuration allows an
An XXE issue exists in Accenture Mercury before 1.12.28 because of the platformlambda/core/serializers/SimpleXmlParser.j
EUVD-2026-104453
GHSA-2658-85cv-9wwq
NVD
CVE.org
EPSS
Exploit-DB