
A proof-of-concept for CVE-2026-39987
Disclaimer This script is for educational and authorized testing purposes ONLY. Unauthorized use of this tool against systems without explicit permission is ILLEGAL. The author is not responsible for any misuse of this information.
Marimo versions prior to 0.23.0 have a critical remote command execution (RCE) vulnerability without prior authentication. The endpoint /terminal/wsdoes not implement adequate access controls, allowing an unauthenticated attacker to gain full interactive shell access to the system.
| Details | Information |
|---|
| CVE | CVE-2026-39987 |
| Severity | CRITICAL |
| CVSS Score | 9.3 (CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H) |
| Type | Pre-Auth Remote Code Execution (RCE) |
| Vector | WebSocket (/terminal/ws) |
| Affected Product | Marimo < 0.23.0 |
| Patch | Marimo ≥ 0.23.0 |
http.favicon.hash:-1864630356
services.http.response.favicons.hashes: -1864630356
-1864630356/api/version# install uv (skip if already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv
uv pip install -r requirements.txt
uv run poc.py -t <target_url>
-t, --target_url (required): WebSocket URI of the target's /terminal/ws endpoint.uv run poc.py -t wss://<target-host>/terminal/ws
Once connected you get an interactive raw pty session. Extra commands available locally (never sent to the remote shell as typed):
| Command | Description |
|---|---|
.upload | Opens a local prompt for a local file path and remote destination, then pushes the file. |
!upload <local_path> <remote_path> | Same as above, one line. |
!download <remote_path> <local_path> | Pulls a file off the target to your local machine. |
/exit, /bye | Tears down the session locally. |
Press Ctrl+C to interrupt/exit.
>= 0.23.0, which fixes the missing access control on /terminal/ws.localhost or an internal interface and front it with a VPN/bastion for remote access./terminal/ws and other API routes./terminal/ws and unauthenticated shell activity in server logs; the Shodan/Censys dorks above can also be used defensively to find your own exposed, unpatched instances.