Sysdig TRT observed a skilled threat actor exploit CVE-2026-39987 in marimo to move from an unauthenticated WebSocket terminal to SSH access on a bastion host in eight seconds, using hand-built Python tooling rather than LLM-generated scripts. The campaign involved AWS credential harvesting, Secrets Manager access, EC2 enumeration, and direct SSH pivoting, with infrastructure tied to Akamai Connected Cloud/Linode. #CVE-2026-39987 #marimo #AWSSecretsManager #Linode
Keypoints
- The attacker exploited CVE-2026-39987, a pre-authentication RCE flaw in marimoâs /terminal/ws WebSocket endpoint.
- Sysdig TRT saw the operator go from WebSocket access to SSH on a bastion host in eight seconds.
- The threat actor used hand-written Python scripts, not recognizable offensive tooling or LLM-generated automation.
- The operator harvested AWS credentials from two different sources and validated them before using them in the attack chain.
- One script retrieved a secret from AWS Secrets Manager and wrote a private SSH key to /tmp/bastion_key for reuse.
- A separate EC2 Instance Connect attempt failed after denied enumeration calls, then incorrectly tried SendSSHPublicKey against a null instance ID.
- The attacker used VPS infrastructure in AS63949 Akamai Connected Cloud/Linode for both source activity and callback services.
MITRE Techniques
- [T1190 ] Exploit Public-Facing Application â The attacker gained initial access by abusing marimoâs unauthenticated terminal WebSocket endpoint. [âexploited CVE-2026-39987, a pre-authentication remote code execution (RCE) vulnerability in marimoâ and âAny client that can open a WebSocket to that path is granted a full interactive shellâ]
- [T1059.006 ] Command and Scripting Interpreter: Python â The operator wrote and ran custom Python scripts for AWS access, key handling, and pivoting. [âthey wrote a Python toolkit they wrote and debugged by handâ and âboto3 chain scriptâ]
- [T1003 ] OS Credential Dumping â The attacker harvested AWS credentials from the compromised hostâs environment and Redis-backed application data. [âCredential 1 was harvested from environment variables and credential filesâ and âCredential 2 was returned by the applicationâs Redis backendâ]
- [T1528 ] Steal Application Access Token â The operator reused harvested cloud credentials to access AWS Secrets Manager and pivot further into the environment. [âusing credentials harvested from the compromised instanceâ and âreplayed against the internet-reachable bastion hostâ]
- [T1552.001 ] Unsecured Credentials: Credentials In Files â Credentials and the resulting SSH key were handled from files on disk such as /tmp/bastion_key. [âwrote the retrieved key to /tmp/bastion_keyâ and âHunt for chain.py, bastion_keyâ]
- [T1082 ] System Information Discovery â The attacker enumerated EC2 resources to identify targets and determine instance IDs. [âDescribeInstancesâ, âDescribeKeyPairsâ, âDescribeInstanceInformationâ and âenumerate running instances to get an instance IDâ]
- [T1021.004 ] Remote Services: SSH â The operator authenticated to a bastion host over SSH using the retrieved private key. [âSSH access to a bastion host with the retrieved private keyâ and âSSH authentication observed at the bastion hostâ]
- [T1105 ] Ingress Tool Transfer â The attacker dropped base64-encoded Python tooling into /tmp/ for later execution. [âecho â | base64 -d > /tmp/.pyâ and âthe toolkit is reproduced below, in deployment orderâ]
- [T1041 ] Exfiltration Over C2 Channel â The operator set up a reverse-shell listener and callback infrastructure on an attacker-owned VPS. [âstarts a new nohup nc -lvp 4444 listenerâ and âcallback sinkâ]
- [T1578 ] Modify Cloud Compute Infrastructure â The EC2 Instance Connect path attempted to push an SSH public key directly to a target instance. [âec2:SendSSHPublicKey firedâ and âuse EC2 Instance Connect to push an operator-controlled public keyâ]
Indicators of Compromise
- [IP address ] Source WebSocket session origin and attacker VPS callback host â 172.236.12.17, 45.79.187.72
- [AWS API calls ] CloudTrail and session activity tied to the intrusion â secretsmanager:GetSecretValue, ec2:SendSSHPublicKey
- [File paths ] Dropped tooling and recovered key material on the compromised host â /tmp/chain.py, /tmp/bastion_key
- [File paths ] Additional execution/log artifacts from the toolkit â /tmp/full_chain.py, /tmp/chain.log
- [Process/artifact names ] Base64-decoded Python chain scripts and shell outputs â /tmp/callback.log, /tmp/chain_output.txt
- [Filename/command artifact ] Reverse-shell and listener tooling â nc -lvp 4444, nohup python3 /tmp/chain.py
Read more: https://www.sysdig.com/blog/machine-speed-hold-the-ai-hand-rolled-marimo-cve-2026-39987-exploit