Detect Marimo Remote Code Execution via Missing Authentication (CVE-2026-39987) in Elastic Security
CVE-2026-39987 is a critical remote code execution vulnerability in the Marimo reactive notebook framework caused by missing authentication (CWE-306) for critical server-side functions. An unauthenticated remote attacker can invoke kernel execution endpoints to run arbitrary Python code in the context of the Marimo server process. This vulnerability is actively exploited in the wild and listed on the CISA KEV catalog.
MITRE ATT&CK
Elastic Detection Query
sequence by host.id with maxspan=2m
[process where event.type == "start"
and (process.name like~ "marimo" or process.command_line like~ "*marimo*")]
[process where event.type == "start"
and process.parent.name like~ "python*"
and process.command_line like~ ("*subprocess*", "*os.system*", "*exec(*", "*eval(*", "*Popen*", "*shell=True*")]
EQL sequence detection matching Marimo server process startup followed within two minutes by a Python child process exhibiting shell execution patterns indicative of CVE-2026-39987 exploitation.
Data Sources
Required Tables
False Positives & Tuning
- Notebooks that intentionally spawn subprocesses for legitimate computation tasks
- Plugin or extension mechanisms within Marimo that launch helper processes
- Automated testing harnesses that start Marimo and then immediately run commands against it
Other platforms for CVE-2026-39987
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 available with Pro.
- Test 1Unauthenticated Marimo Kernel RCE via HTTP POST
Expected signal: HTTP POST to Marimo port 2718 from loopback or external IP; new child process (sh or bash) spawned under the Marimo/Python process; creation of /tmp/marimo_rce_test.txt by the Marimo server user
- Test 2Marimo RCE Reverse Shell Simulation
Expected signal: Outbound TCP connection from Marimo Python process to loopback port 9999; /bin/sh spawned as child of Python under Marimo server; socket.connect syscall in audit logs
- Test 3Marimo Persistence via Cron Injection through RCE
Expected signal: subprocess.run executing bash crontab command as Marimo server user; crontab modification event in audit logs; new cron entry for the Marimo user account
Unlock Pro Content
Get the full detection package for CVE-2026-39987 including response playbook, investigation guide, and atomic red team tests.