Detect Mercury Unauthenticated RCE via /api/kernels (CVE-2026-111058) in Sumo Logic CSE
Detects exploitation of CVE-2026-111058, a missing-authorization (CWE-862) vulnerability in mljar Mercury <= 3.2.5 that exposes the Jupyter-style /api/kernels endpoint without authentication. An unauthenticated attacker can create a kernel and submit arbitrary code for execution over the kernel WebSocket/channels interface, resulting in remote code execution on the host running the Mercury app server. Detection focuses on unauthenticated HTTP requests to /api/kernels (POST to create kernels, GET to enumerate), rapid kernel-create activity, and suspicious child processes spawned by the Mercury/python server process consistent with code execution inside a kernel.
MITRE ATT&CK
- Tactic
- Initial Access Execution
Sumo Detection Query
// df00tech DF00-630fa45508 · https://df00tech.com/detections/CVE-2026-111058 · licence: https://df00tech.com/detections/licence
_sourceCategory=*web* OR _sourceCategory=*proxy*
| parse regex "(?<method>\w+)\s+(?<url_path>/\S*)\s+HTTP" nodrop
| parse regex "\"(?<user>[^\"]*)\"\s*$" nodrop
| where url_path matches "/api/kernels*"
| where method in ("POST", "GET", "DELETE")
| where isBlank(user) or user = "-"
| count as requests, values(method) as methods by src_ip, url_path
| where requests >= 1
| sort by requests desc Detects unauthenticated requests to the Mercury /api/kernels endpoint in Sumo Logic web/proxy source categories.
Data Sources
Required Tables
False Positives & Tuning
- Anonymous uptime/health monitoring of the API path.
- Trusted lab Mercury instances intentionally unauthenticated.
- API discovery scans from internal security tooling.
Other platforms for CVE-2026-111058
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.
- Test 1 Unauthenticated kernel creation via /api/kernels
Expected signal: Web/proxy log entry: POST /api/kernels with 201 status and no authenticated username.
- Test 2 Enumerate active kernels anonymously
Expected signal: Web/proxy log entry: GET /api/kernels with 200 status and no authenticated username.
- Test 3 Code execution inside kernel spawns shell
Expected signal: Process creation event: /bin/sh (and id/whoami) with parent process python3.
Response Playbook
Triage
- Confirm the Mercury version in use (check pip show mercury / the app server banner); versions <= 3.2.5 are vulnerable to CVE-2026-111058.
- Review web/proxy logs for unauthenticated POST/GET requests to /api/kernels from the flagged source IP, and correlate timestamps with any kernel WebSocket (/api/kernels/<id>/channels) upgrades.
- Inspect process telemetry on the Mercury host for child processes (shells, curl/wget, whoami/id) spawned by the python/mercury server process around the request time.
- Determine whether the source IP is an expected monitoring/internal system or an unknown external attacker.
Containment
- Block the attacking source IP at the WAF/firewall and restrict /api/kernels to authenticated internal users only.
- Isolate the Mercury host from the network if post-exploitation process activity is confirmed.
- Upgrade Mercury to 3.2.6 or later, which adds authorization enforcement on the kernels API.
Evidence Collection
- Preserve web/reverse-proxy access logs covering requests to /api/kernels and /api/kernels/*/channels.
- Capture process creation events, command lines, and network connections from the Mercury host for the exploitation window.
- Snapshot the host memory and the Mercury working directory / notebook files before remediation.
Escalation Criteria
- !Escalate to incident response if a child process (shell, downloader, or recon command) was spawned by the Mercury server process following an unauthenticated /api/kernels request.
- !Escalate if outbound C2-like connections or new persistence mechanisms are observed on the Mercury host after the suspicious requests.
Investigation Guide
Forensic Artifacts
- >
Web/reverse-proxy access log entries for /api/kernels and /api/kernels/<id>/channels - >
Child processes and command lines parented to the python/mercury server process - >
Mercury server application logs showing kernel create/execute events without an associated authenticated session
Tuning Guidance
If Mercury is intentionally run without authentication inside a trusted network segment, scope the detection to external source IPs or correlate strictly with the post-request suspicious-child-process signal to reduce noise. Baseline known monitoring/uptime source IPs and exclude them. Raise confidence to high when the network request is followed within minutes by a shell or downloader spawned by the Mercury process.
Hunting Queries
Hunt for all unauthenticated access to the Mercury kernels API across web logs, grouped by source IP and method.
// df00tech DF00-630fa45508 · https://df00tech.com/detections/CVE-2026-111058 · licence: https://df00tech.com/detections/licence
W3CIISLog | where csUriStem startswith "/api/kernels" | where isempty(csUsername) or csUsername == "-" | summarize count() by cIP, csMethod, csUriStem ``` df00tech DF00-630fa45508 · https://df00tech.com/detections/CVE-2026-111058 · licence: https://df00tech.com/detections/licence ```
index=web uri_path="/api/kernels*" (user="-" OR user="") | stats count by src_ip, method, uri_path Atomic Red Team Tests
Simulates an attacker creating a Jupyter-style kernel on a Mercury instance without authentication.
Command
curl -s -X POST http://localhost:8000/api/kernels -H 'Content-Type: application/json' -d '{"name":"python3"}' Cleanup
KID=$(curl -s http://localhost:8000/api/kernels | python3 -c 'import sys,json;print(json.load(sys.stdin)[0]["id"])' 2>/dev/null); [ -n "$KID" ] && curl -s -X DELETE http://localhost:8000/api/kernels/$KID Expected Telemetry
Web/proxy log entry: POST /api/kernels with 201 status and no authenticated username.
Expected Detection
KQL/SPL/AQL rules flag the unauthenticated POST to /api/kernels.
Simulates attacker reconnaissance of existing kernels via an unauthenticated GET request.
Command
curl -s http://localhost:8000/api/kernels Cleanup
echo 'no cleanup required' Expected Telemetry
Web/proxy log entry: GET /api/kernels with 200 status and no authenticated username.
Expected Detection
Web-log rules flag the unauthenticated GET to /api/kernels.
Simulates post-exploitation code execution where submitted kernel code shells out to a recon command, producing a suspicious child process of the Mercury/python server.
Command
python3 -c "import subprocess; subprocess.run(['/bin/sh','-c','id; whoami'])" Cleanup
echo 'no cleanup required' Expected Telemetry
Process creation event: /bin/sh (and id/whoami) with parent process python3.
Expected Detection
Elastic EQL and CrowdStrike CQL rules flag the suspicious child process parented to python/mercury.