What is Marimo?
Marimo is an open-source reactive Python notebook platform (19,600+ GitHub stars) designed as a modern replacement for Jupyter. Unlike traditional notebooks, Marimo notebooks are stored as pure Python files and execute reactively — changing one cell automatically re-runs dependent cells. It is widely used by data scientists, ML engineers, and AI researchers for interactive model development, data exploration, and sharing reproducible analyses.
Marimo instances are commonly deployed with network-accessible interfaces — either locally on
developer machines, in cloud environments, or as shared team notebooks. This deployment pattern
makes the unauthenticated terminal endpoint a high-value attack surface: a single HTTP upgrade
request to /terminal/ws yields an interactive root shell on the server.
Overview
/terminal/ws is completely unauthenticated, allowing any network-reachable
attacker to obtain an interactive PTY shell. CISA added this to the
KEV Catalog
on April 23, 2026 with a remediation deadline of May 7, 2026.
The vulnerability carries a CVSS score of 9.8 (Critical) and requires no authentication, no credentials, and no user interaction. An attacker with network access to a Marimo instance can send a single WebSocket upgrade request and receive a fully interactive terminal — even when authentication is enabled on the application. Exploitation was documented less than 10 hours after the vendor advisory was published on April 8, 2026.
Within days of public disclosure, threat actors deployed a previously undocumented variant of the NKAbuse blockchain-based backdoor (Go-based, using NKN for C2) by hosting malware on HuggingFace Spaces and fetching it via the exploited terminal.
Affected Versions
| Product | Vulnerable Versions | Fixed Version |
|---|---|---|
Marimo (PyPI: marimo) |
All versions < 0.23.0 | 0.23.0 (released April 8, 2026) |
The advisory originally referenced 0.20.4 as the last vulnerable version, but the structured
version range in the GHSA advisory was later corrected to < 0.23.0. Users
should upgrade to 0.23.0 or later regardless of their current version.
Technical Details
Root Cause: Missing Authentication on /terminal/ws
Marimo exposes a built-in terminal via a WebSocket endpoint at /terminal/ws.
Other WebSocket endpoints in the application correctly call validate_auth()
before accepting connections. The terminal endpoint, however, only checks two conditions
before accepting connections:
- Whether the server is running in the correct mode (not read-only)
- Whether the platform supports PTY allocation
Authentication is never checked. Once connected, the client receives a full interactive PTY shell running as the user that launched the Marimo server — typically the developer's own account or, in containerized deployments, root.
CWE-306: Missing Authentication for Critical Function
This maps to CWE-306. The terminal is a critical function (arbitrary OS command
execution) that was inadvertently left without any access control. The fix in 0.23.0 adds
validate_auth() to the terminal endpoint's connection handler, consistent with
how other authenticated endpoints are protected.
Attack Characteristics
| Attribute | Value |
|---|---|
| Authentication required | None |
| User interaction required | None |
| Attack complexity | Low — single WebSocket upgrade request |
| Network position | Any host with TCP access to Marimo port (default 2718) |
| Result | Full interactive PTY shell as the Marimo process user |
| CVSS score | 9.8 (Critical) |
Discovery
The vulnerability was reported to the Marimo team and disclosed via GitHub Security Advisory GHSA-2679-6mx9-h9xc on April 8, 2026. The Marimo maintainers released the patch (version 0.23.0) on the same day as the advisory, providing no window between disclosure and a fix being available. Despite this, attackers built a working exploit from the advisory description alone within hours of publication.
Exploitation Context
Exploitation was confirmed within hours of the public advisory. The Sysdig Threat Research Team recorded the first exploitation attempt 9 hours and 41 minutes after the advisory was published, with a complete credential theft operation executed in under 3 minutes. No public PoC existed at the time — the attacker built a working exploit directly from the advisory text.
Campaign Activity (April 11–14, 2026)
Sysdig documented a subsequent wave of attacks over four days:
- 662 exploit events recorded
- 11 unique source IPs across 10 countries
- Techniques observed: reverse shell deployment, credential extraction, DNS exfiltration, lateral movement to co-located PostgreSQL and Redis via leaked credentials
NKAbuse Blockchain Backdoor via HuggingFace
One threat actor hosted a malware binary on HuggingFace Spaces and fetched it via the exploited terminal. The payload was a previously undocumented variant of NKAbuse — a Go-based backdoor that uses the NKN (New Kind of Network) blockchain for command and control, making traditional IP-based C2 blocking ineffective. This appears to be the first documented use of NKAbuse delivered via an AI development toolchain vulnerability.
Internet Exposure
Marimo instances exposed to the internet can be identified via Shodan using the favicon hash
query http.favicon.hash:-1864630356. Exposure is concentrated in research,
academic, and ML engineering environments. A public proof-of-concept was published on
April 13, 2026 (fevar54/marimo_CVE-2026-39987_RCE_PoC),
further lowering the barrier to exploitation.
Remediation
-
Upgrade Marimo to version 0.23.0 or later immediately.
Run
pip install --upgrade marimo. The patch adds authentication validation to the/terminal/wsendpoint. - Restrict network access. If you cannot patch immediately, block external access to the Marimo port (default: 2718) via firewall rules. Marimo should not be internet-accessible unless explicitly required.
- Rotate all exposed secrets. If your Marimo instance was accessible to untrusted networks before patching, treat all secrets present in the environment (API keys, database credentials, SSH keys, cloud credentials) as compromised. Rotate them immediately.
-
Review WebSocket connection logs. Check for unexpected connections to
/terminal/ws. Any connection to this path from an unauthorized host indicates exploitation. Look for outbound connections to unknown hosts originating from the Marimo server process shortly after. -
Check for NKAbuse indicators. Look for unexpected Go binaries downloaded
from
huggingface.coor similar platforms, unusual outbound traffic to NKN blockchain nodes, and new persistence mechanisms (cron jobs, systemd units) created by the Marimo server process.
Key Details
| Property | Value |
|---|---|
| CVE ID | CVE-2026-39987 |
| Vendor / Product | Marimo — Marimo |
| NVD Published | 2026-04-09 |
| NVD Last Modified | 2026-04-23 |
| CVSS 3.1 Score | 9.8 |
| CVSS 3.1 Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Severity | CRITICAL |
| CWE | CWE-306 |
| CISA KEV Added | 2026-04-23 |
| CISA KEV Deadline | 2026-05-07 |
| Known Ransomware Use | No |
CVSS 3.1 Breakdown
Required Action
Timeline
| Date | Event |
|---|---|
| 2026-04-08 | Vendor publishes advisory GHSA-2679-6mx9-h9xc; CVE-2026-39987 assigned; Marimo 0.23.0 patch released |
| 2026-04-08 | First exploitation observed in the wild — 9 hours 41 minutes after advisory publication (Sysdig) |
| 2026-04-11 | Multi-country exploitation campaign begins; attacks include reverse shells, credential theft, DNS exfiltration |
| 2026-04-13 | Public proof-of-concept published (fevar54/marimo_CVE-2026-39987_RCE_PoC) |
| 2026-04-14 | Sysdig documents 662 exploit events from 11 unique IPs across 10 countries; NKAbuse blockchain backdoor deployed via HuggingFace |
| 2026-04-23 | Added to CISA Known Exploited Vulnerabilities catalog |
| 2026-05-07 | CISA BOD 22-01 remediation deadline |
References
| Resource | Type |
|---|---|
| NVD — CVE-2026-39987 | Vulnerability Database |
| CISA KEV Catalog Entry | US Government |
| GHSA-2679-6mx9-h9xc — Pre-Auth RCE via Terminal WebSocket Authentication Bypass | Vendor Advisory |
| Sysdig TRT — Attackers Weaponize Marimo to Deploy Blockchain Botnet via HuggingFace | Security Research |
| Resecurity — Marimo Pre-Auth RCE via Unauthenticated WebSocket Terminal | Security Research |
| Endor Labs — Root in One Request: Marimo's Critical Pre-Auth RCE | Security Research |
| BleepingComputer — Critical Marimo pre-auth RCE flaw now under active exploitation | News |
| The Hacker News — Marimo RCE Flaw Exploited Within 10 Hours of Disclosure | News |
| Cloud Security Alliance — Marimo Pre-Auth RCE: AI Development Toolchain Under Attack | Security Research |