CVE-2026-111059: Mercury: stored XSS via unsanitized Markdown HTML

GHSA-2658-85cv-9wwqMEDIUM
Published October 19, 2026
CISO Take

Mercury, a Python framework that turns Jupyter notebooks into shared web apps and dashboards, has a cross-site scripting flaw (CVE-2026-111059) in versions 3.0.0 to 3.2.10. Its mr.Markdown component passes attacker-controlled Markdown to an HTML widget without sanitizing it, so event-handler attributes and other active HTML run in the browser of anyone who views the app. Severity is medium (CVSS 6.1). EPSS is low at 0.00284 (top 80th percentile), the CVE is not in CISA KEV, and there is no public exploit or Nuclei template. The package has 3,043 dependents and an OpenSSF Scorecard of 5.8/10, and 72 other CVEs have been reported against it. Upgrade to Mercury 3.2.11 and prioritize any deployment where untrusted users can supply Markdown content or where dashboards are shared with privileged staff.

Sources:NVDEPSSGitHub AdvisoryATLASOpenSSF

What is the risk?

Medium overall. The attack is network-reachable, low complexity and needs no privileges, but a victim must view the poisoned content (CVSS UI:R). The scope is changed (S:C), so script runs in the victim's browser session. Real risk depends on whether the Markdown can be influenced by untrusted parties, for example through user input, shared notebooks or external data feeds. Exploitation likelihood is low per EPSS, with no public exploit and no KEV listing. Internal-only dashboards that only trusted authors write to carry much lower exposure.

How does the attack unfold?

Content Injection
Attacker places raw HTML with an event-handler attribute into Markdown that a Mercury app renders.
AML.T0049
Victim Views App
A user opens the shared dashboard and the unsanitized HTML is written to the DOM.
AML.T0078
Script Execution
The injected JavaScript runs in the victim's browser within the Mercury origin.
Impact
Session tokens or data are stolen, or actions are performed as the victim, or the displayed results are altered.

What systems are affected?

PackageEcosystemVulnerable RangePatched
Jupyter Notebookpip>= 3.0.0, < 3.2.113.2.11
13.5KOpenSSF 5.83.0K dependentsPushed 11d ago79% patched~75d to patchFull package profile →

Do you use Jupyter Notebook? You're affected.

How severe is it?

CVSS 3.1
6.1 / 10
EPSS
0.3%
chance of exploitation in 30 days
Higher than 21% of all CVEs
Exploitation Status
No known exploitation
Sophistication
Trivial

What is the attack surface?

AVACPRUISCIA
AVNetwork
ACLow
PRNone
UIRequired
SChanged
CLow
ILow
ANone

What should I do?

1 step
  1. 1) Upgrade mercury to 3.2.11 or later (pip install -U mercury). 2) Until patched, avoid passing untrusted or user-supplied content to mr.Markdown and restrict who can author or edit notebooks. 3) Put a strict Content-Security-Policy (no inline scripts, no inline event handlers) in front of Mercury deployments. 4) Place dashboards behind authentication and limit sharing to trusted users. 5) Review notebooks and stored content for raw HTML such as <script>, onerror= or onload= attributes. 6) Inventory Mercury versions via SBOM or pip freeze and track GHSA-2658-85cv-9wwq.

What does CISA's SSVC say?

DecisionTrack
Exploitationnone
AutomatableNo
Technical Impactpartial

Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.

How is it classified?

Which compliance frameworks are affected?

This CVE is relevant to:

EU AI Act
Art. 15-Accuracy, robustness and cybersecurity
ISO 42001
A.6.2.6-AI system operation and monitoring
NIST AI RMF
MANAGE 2.3-Responses to identified AI risks and incidents

Frequently Asked Questions

What is CVE-2026-111059?

Mercury, a Python framework that turns Jupyter notebooks into shared web apps and dashboards, has a cross-site scripting flaw (CVE-2026-111059) in versions 3.0.0 to 3.2.10. Its mr.Markdown component passes attacker-controlled Markdown to an HTML widget without sanitizing it, so event-handler attributes and other active HTML run in the browser of anyone who views the app. Severity is medium (CVSS 6.1). EPSS is low at 0.00284 (top 80th percentile), the CVE is not in CISA KEV, and there is no public exploit or Nuclei template. The package has 3,043 dependents and an OpenSSF Scorecard of 5.8/10, and 72 other CVEs have been reported against it. Upgrade to Mercury 3.2.11 and prioritize any deployment where untrusted users can supply Markdown content or where dashboards are shared with privileged staff.

Is CVE-2026-111059 actively exploited?

No confirmed active exploitation of CVE-2026-111059 has been reported, but organizations should still patch proactively.

How to fix CVE-2026-111059?

1) Upgrade mercury to 3.2.11 or later (pip install -U mercury). 2) Until patched, avoid passing untrusted or user-supplied content to mr.Markdown and restrict who can author or edit notebooks. 3) Put a strict Content-Security-Policy (no inline scripts, no inline event handlers) in front of Mercury deployments. 4) Place dashboards behind authentication and limit sharing to trusted users. 5) Review notebooks and stored content for raw HTML such as <script>, onerror= or onload= attributes. 6) Inventory Mercury versions via SBOM or pip freeze and track GHSA-2658-85cv-9wwq.

What systems are affected by CVE-2026-111059?

This vulnerability affects the following AI/ML architecture patterns: Notebook-to-web-app dashboards, ML experiment reporting portals, Internal data science tooling.

What is the CVSS score for CVE-2026-111059?

CVE-2026-111059 has a CVSS v3.1 base score of 6.1 (MEDIUM). The EPSS exploitation probability is 0.28%.

What is the AI security impact?

Affected AI Architectures

Notebook-to-web-app dashboardsML experiment reporting portalsInternal data science tooling

MITRE ATLAS Techniques

AML.T0049Exploit Public-Facing Application
AML.T0078Drive-by Compromise

Compliance Controls Affected

EU AI Act: Art. 15
ISO 42001: A.6.2.6
NIST AI RMF: MANAGE 2.3

What are the technical details?

Original Advisory

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.

Exploitation Scenario

An attacker who can influence Markdown rendered by a shared Mercury dashboard, for example through a user-input field, a notebook they are allowed to edit, or an upstream data source, embeds an HTML tag with an event handler such as an img onerror attribute. When an analyst or data scientist opens the app, the payload runs in their browser. It steals the session cookie or token, calls Mercury or neighboring internal endpoints as the victim, or shows a fake login prompt to harvest credentials.

Weaknesses (CWE)

CWE-116 — Improper Encoding or Escaping of Output: The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.

  • [Architecture and Design] Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, consider using the ESAPI Encoding control [REF-45] or a similar tool, library, or framework. These will help the programmer encode outputs in a manner less prone to error. Alternately, use built-in functions, but consider using wrappers in case those functions are discovered to have a vulnerability.
  • [Architecture and Design] If available, use structured mechanisms that automatically enforce the separation between data and code. These mechanisms may be able to provide the relevant quoting, encoding, and validation automatically, instead of relying on the developer to provide this capability at every point where output is generated. For example, stored procedures can enforce database query structure and reduce the likelihood of SQL injection.

Source: MITRE CWE corpus.

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Timeline

Published
October 19, 2026
Last Modified
October 20, 2026
First Seen
October 19, 2026

Related Vulnerabilities