AI Security AI安全 3h ago Updated 2h ago 更新于 2小时前 45

Marimo Notebook Flaw Could Run MCP Commands Before Cells Execute in Edit Mode Marimo 笔记本漏洞可在编辑模式下于单元格执行前运行 MCP 命令

Marimo notebook software contained a high-severity code injection vulnerability (CVE-2026-75149, CVSS 8.8) allowing attacker-supplied MCP commands to execute as local subprocesses before any notebook cell runs The flaw affects all Marimo versions prior to 0.23.15 and requires only user interaction (opening the notebook in edit mode) with no attacker authentication needed Marimo patched the issue through a PEP 723 hardening patch that treats notebook metadata as untrusted and removes dangerous co Marimo Notebook存在高严重性代码注入漏洞(CVE-2026-75149),攻击者可通过特制笔记本在编辑模式下执行恶意MCP命令,无需认证即可利用 漏洞CVSS v4评分8.7/v3.1评分8.8,影响0.23.15之前版本,命令会在单元格执行前作为本地子进程运行 Marimo已在0.23.15版本修复漏洞,实施PEP 723加固补丁,将笔记本元数据视为不可信输入并通过白名单过滤配置 同一配置边界还存在CVE-2026-67618漏洞(AI base_url注入),可导致用户API密钥泄露给恶意端点 漏洞发现者Gregory Tan(Grg0rry)同时也是Marimo安全补丁的共

65
Hot 热度
60
Quality 质量
65
Impact 影响力

Analysis 深度分析

TL;DR

  • Marimo notebook software contained a high-severity code injection vulnerability (CVE-2026-75149, CVSS 8.8) allowing attacker-supplied MCP commands to execute as local subprocesses before any notebook cell runs
  • The flaw affects all Marimo versions prior to 0.23.15 and requires only user interaction (opening the notebook in edit mode) with no attacker authentication needed
  • Marimo patched the issue through a PEP 723 hardening patch that treats notebook metadata as untrusted and removes dangerous configuration sections (ai, mcp, completion, secrets, server) via allowlist filtering
  • The same configuration boundary was previously exploited in CVE-2026-67618 (CVSS 7.1), which allowed attacker-controlled AI base_url to steal API keys without cell execution
  • Gregory Tan (Grg0rry) discovered the vulnerability and also co-authored the hardening commit; the fix was included in version 0.23.15 (July 23, 2026)

Why It Matters

This vulnerability highlights a critical attack surface in AI notebook ecosystems where malicious notebooks can execute arbitrary code before any user interaction beyond opening the file. As Model Context Protocol (MCP) adoption grows across AI tooling, similar injection vectors could emerge in other platforms that trust notebook metadata. The incident underscores the importance of treating all externally-sourced notebook configurations as potentially hostile and implementing strict allowlist-based filtering.

Technical Details

  • Vulnerability Type: Code injection via notebook metadata, specifically through the MCP (Model Context Protocol) configuration section in notebook JSON
  • Attack Vector: A specially crafted notebook embeds an attacker-controlled MCP server command in its metadata; when opened in edit mode, Marimo launches this command as a local subprocess before executing any cells
  • Affected Versions: All Marimo releases prior to 0.23.15; the current stable release as of August 2026 is 0.24.0
  • CVSS Scores: CVSS v3.1 score of 8.8 (High); CVSS v4 score of 8.7 (High); requires user interaction but no authentication
  • Patch Approach: Marimo's PEP 723 hardening patch removes five notebook-supplied configuration sections (ai, mcp, completion, secrets, server) and passes remaining configuration through a strict allowlist, treating all notebook metadata as attacker-controlled
  • Related Vulnerabilities: CVE-2026-67618 (CVSS 7.1) addressed a similar boundary issue with AI base_url injection; CVE-2026-39987 (patched in 0.23.0) involved missing authentication on the /terminal/ws endpoint allowing PTY shell access

Industry Insight

  • Notebook Security Must Evolve Beyond Cell Execution: Traditional notebook security models focus on code execution within cells, but this vulnerability demonstrates that metadata parsing alone can become an arbitrary code execution vector—security frameworks need to harden all input surfaces, not just executable content
  • MCP Ecosystem Security Is an Emerging Priority: As MCP becomes a standard protocol for connecting AI models to tools and data sources, the attack surface for protocol-level injection in notebook and IDE contexts will expand; developers should adopt zero-trust principles for all MCP configuration sources
  • Rapid Patching Cycles Are Essential for AI Tooling: Marimo released the fix within weeks of the earlier related CVE, but the existence of multiple vulnerabilities in the same configuration boundary suggests that security audits should comprehensively review all metadata parsing paths rather than patching individual issues in isolation

TL;DR

  • Marimo Notebook存在高严重性代码注入漏洞(CVE-2026-75149),攻击者可通过特制笔记本在编辑模式下执行恶意MCP命令,无需认证即可利用
  • 漏洞CVSS v4评分8.7/v3.1评分8.8,影响0.23.15之前版本,命令会在单元格执行前作为本地子进程运行
  • Marimo已在0.23.15版本修复漏洞,实施PEP 723加固补丁,将笔记本元数据视为不可信输入并通过白名单过滤配置
  • 同一配置边界还存在CVE-2026-67618漏洞(AI base_url注入),可导致用户API密钥泄露给恶意端点
  • 漏洞发现者Gregory Tan(Grg0rry)同时也是Marimo安全补丁的共同作者,体现了开源社区的安全协作模式

为什么值得看

该漏洞揭示了AI开发工具链中笔记本文件作为攻击载体的新风险,MCP协议普及后此类配置注入攻击面将扩大。对使用Marimo等交互式AI开发环境的团队而言,及时升级和配置审计是保障API密钥与执行环境安全的关键。

技术解析

  • 漏洞利用链:攻击者构造包含恶意MCP服务器配置的笔记本文件 → 受害者以编辑模式打开 → 配置的命令在单元格执行前作为本地子进程启动 → 实现远程代码执行
  • 修复方案:PEP 723加固补丁将笔记本元数据视为攻击者可控输入,通过白名单机制移除危险配置段(ai、mcp、completion、secrets、server),并添加回归测试验证MCP部分被正确剥离
  • 关联漏洞:CVE-2026-67618(CVSS 7.1)涉及同一配置边界,攻击者通过笔记本元数据注入恶意AI base_url,当用户发起AI请求时API密钥被发送至攻击者控制的端点
  • 历史漏洞:CVE-2026-39987(影响≤0.20.4)为终端端点缺少认证验证,可导致PTY shell获取,已在0.23.0版本修复

行业启示

  • AI工具供应链安全需重视:笔记本文件正成为新的攻击载体,开发者和企业应建立严格的依赖更新机制,对第三方笔记本文件进行安全审查
  • MCP协议安全设计待完善:随着Model Context Protocol成为AI工具标准接口,协议层需加强配置验证和权限隔离,防止配置注入攻击
  • 开源项目安全响应模式值得借鉴:Marimo快速修复并公开CVE、发现者与开发者身份重合的协作模式,体现了成熟开源项目的安全治理能力

Disclaimer: The above content is generated by AI and is for reference only. 免责声明:以上内容由 AI 生成,仅供参考。

Security 安全 Open Source 开源 LLM 大模型 Agent Agent