Skip to main content

Mercury EUVDEUVD-2026-104453

| CVE-2026-111059 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-10-19 GitHub_M GHSA-2658-85cv-9wwq
6.1
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Submit Markdown payload with active HTML
  2. Delivery
    Payload stored/passed to mr.Markdown
  3. Exploit
    python-markdown emits raw HTML unsanitized
  4. Execution
    ipywidgets.HTML writes value via innerHTML
  5. Impact
    Victim 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.

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

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

Alert me

AnalysisAIv1 – 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

mercury 3.0.0, < 3.2.11

Affected Packages

pypi mercury fix: 3.2.11

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

Vendor (GitHub_M) PRIMARY 6.1 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
vuln.today AI 6.1 MEDIUM

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.

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

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

1
Patch available
Oct 19, 2026 - 18:03 EUVD

DescriptionCVE.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

EPSS Score
0.3%
Top 80% exploitable
Prevalence
Low
niche open-source Python/Jupyter dashboard framework, limited enterprise footprint
Threat Intel
1
1 source
Data Quality
5 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.3%
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

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

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

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