Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-111058 Overview
Mercury is a Python framework from mljar for sharing Jupyter notebooks as interactive web applications and dashboards. CVE-2026-111058 is a missing authorization flaw [CWE-862] affecting default tokenless Mercury deployments prior to version 3.2.6. Anonymous network clients can create Jupyter kernels through /api/kernels and send execute_request websocket messages containing arbitrary Python code. The endpoint blocklist did not cover kernel endpoints, and the websocket wrapper tracked idle activity without authorizing executable messages. Exploitation yields remote code execution in the context of the Mercury server process. The issue is fixed in Mercury 3.2.6.
Critical Impact
Unauthenticated attackers can execute arbitrary Python code on any Mercury server running a default tokenless deployment, leading to full host compromise.
Affected Products
- mljar Mercury versions prior to 3.2.6
- Mercury deployments configured without an identity token or password
- Jupyter kernel endpoints exposed through Mercury's websocket wrapper
Discovery Timeline
- 2026-10-19 - CVE-2026-111058 published to NVD
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-111058
Vulnerability Analysis
Mercury acts as a reverse proxy and websocket wrapper around a Jupyter server. In default tokenless deployments, administrators expect Mercury to restrict access to notebook rendering endpoints while blocking execution surfaces. The pre-3.2.6 endpoint blocklist omitted /api/kernels, so remote clients could issue kernel-creation requests without authentication. Once a kernel exists, the attacker opens the corresponding websocket channel and submits standard Jupyter execute_request messages. The websocket wrapper monitored these messages for idle-timeout tracking but did not evaluate whether the sender was authorized to execute code. The outcome is unauthenticated remote code execution as the user running the Mercury process.
Root Cause
The root cause is missing authorization [CWE-862] at two layers: the HTTP endpoint filter failed to include kernel management routes, and the websocket handler lacked an authorization check for executable payloads. Idle-activity bookkeeping was conflated with access control, so any message that reset the idle timer was implicitly allowed to execute.
Attack Vector
The attack is network-reachable and requires no privileges or user interaction. An attacker locates a public Mercury instance, issues a POST /api/kernels request to spawn a kernel, upgrades to the kernel websocket, and transmits an execute_request message carrying arbitrary Python. The code runs inside the Jupyter kernel subprocess with the privileges of the Mercury host account.
# Security patch excerpt from mercury_app/app.py (Mercury 3.2.6)
# Replaces the previous idle-only websocket patch with execution-aware handlers
from .idle_timeout import (
TimeoutActivityTransform,
TimeoutManager,
)
from .execution import ExecutionRegistry, MercuryKernelWebsocketConnection
from .execution.handlers import (
MercuryCheckpointsHandler,
MercuryKernelActionHandler,
MercuryKernelHandler,
MercuryMainKernelHandler,
MercurySessionHandler,
MercurySessionRootHandler,
)
from .mercury_hybrid_cm import HybridContentsManager
from .notebooks import NotebooksAPIHandler
from .root import RootIndexHandler
from .theme_handler import ThemeHandler
from .security_mode import detect_standalone_security_mode
Source: GitHub Commit 73a40ce
Stop Remote Code Execution Before It Runs
Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.
Stop Exploit AttemptsDetection Methods for CVE-2026-111058
Indicators of Compromise
- Unauthenticated POST /api/kernels requests to Mercury-fronted hosts, especially from unexpected source addresses.
- Websocket connections to /api/kernels/<kernel_id>/channels carrying execute_request messages from anonymous sessions.
- Spawned Python kernel subprocesses initiating outbound network connections, writing to unexpected paths, or launching shells.
- Mercury server logs showing kernel creation without an associated authenticated user context.
Detection Strategies
- Inspect reverse-proxy and application logs for access to /api/kernels and /api/sessions routes prior to the 3.2.6 upgrade.
- Correlate kernel-process ancestry: alert when jupyter-kernel or ipykernel_launcher children of the Mercury process execute shell binaries, package managers, or compilers.
- Monitor for Python processes under the Mercury service account issuing socket, subprocess, or os.system activity that deviates from notebook baselines.
Monitoring Recommendations
- Enable verbose access logging on any load balancer or ingress controller fronting Mercury and retain logs for retrospective hunting.
- Alert on first-seen remote IPs connecting to Mercury websocket endpoints and on unusual command-line arguments for kernel subprocesses.
- Baseline outbound network traffic from Mercury hosts and flag new destinations consistent with reverse shells or data exfiltration.
How to Mitigate CVE-2026-111058
Immediate Actions Required
- Upgrade Mercury to version 3.2.6 or later on all deployments.
- Place Mercury behind an authenticating reverse proxy until the upgrade is complete.
- Audit Mercury hosts for signs of unauthorized kernel execution, newly created files, scheduled tasks, or outbound connections.
- Rotate any credentials, API tokens, or SSH keys that resided on the Mercury host.
Patch Information
The fix is delivered in Mercury 3.2.6. The patch replaces the previous idle-only websocket wrapper with dedicated kernel and session handlers (MercuryKernelHandler, MercuryKernelActionHandler, MercurySessionHandler), adds an ExecutionRegistry and MercuryKernelWebsocketConnection that authorize executable messages, and introduces a detect_standalone_security_mode helper to govern tokenless deployments. See the GitHub Security Advisory GHSA-rv4m-xm3f-3ccq and the Mercury 3.2.6 Release Notes for full details.
Workarounds
- Configure a non-empty Jupyter identity token or password via --IdentityProvider.token or --IdentityProvider.hashed_password before exposing Mercury.
- Restrict network access to Mercury with firewall rules, VPN, or an authenticating reverse proxy such as oauth2-proxy.
- Block external access to /api/kernels, /api/sessions, and the kernel websocket channels at the ingress layer until patching is complete.
# Upgrade Mercury to the patched release
pip install --upgrade "mercury>=3.2.6"
# Verify the installed version
python -c "import mercury; print(mercury.__version__)"
# Example: start Mercury with an identity token instead of tokenless mode
export MERCURY_TOKEN="$(python -c 'import secrets; print(secrets.token_urlsafe(32))')"
mercury run --IdentityProvider.token="$MERCURY_TOKEN"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

