Skip to content
RCE Write-up Intermediate

Machine speed, hold the AI: Hand-rolled marimo CVE-2026-39987 exploit

A pre-authentication remote code execution flaw in marimo's terminal WebSocket endpoint let any client open an interactive shell without credentials. The operator used it to harvest AWS credentials, pull an SSH private key from Secrets Manager and log into a bastion host.

webflow.sysdig.com

Published on webflow.sysdig.com

Sysdig Threat Research Team

The author, on webflow.sysdig.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The terminal WebSocket endpoint skipped the authentication check that the application's other WebSocket endpoints perform.

Impact

The attacker gained a full shell on the notebook host and could pivot into the victim's cloud account, though several EC2 enumeration calls were denied and the key-push attempt was blocked.

What the attacker needed

Network access to the marimo instance; no credentials needed

The fix

The flaw was fixed in version 0.23.0 by adding the missing authentication check to the terminal endpoint.

How it was found

  1. Open a WebSocket connection to the terminal endpoint without any credentials.
  2. Run a TCP sweep of the local subnet to see what else is reachable.
  3. Drop base64-encoded Python scripts into the temporary directory.
  4. Use harvested AWS credentials to fetch a secret from Secrets Manager.
  5. Write the retrieved SSH private key to disk and use it to log into a bastion host.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A notebook tool called marimo runs a small web server, and one of its web addresses for a live terminal forgot to check who was connecting. Anyone who found that address could type commands on the server as if sitting at its keyboard. From there the attacker read stored cloud passwords and used them to reach other machines.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.