本文へ移動
English version →
高 7.8

codebase-memory-mcpに悪意あるリポジトリを読み込まれるとヒープ破損が起きる脆弱性

CVE-2026-114495 SecPulse初出

概要

codebase-memory-mcpの0.9.0より前のバージョンには、.codebase-memory/の成果物を自動で取り込む処理に整数の切り捨てによるヒープバッファオーバーフローの脆弱性があります。悪意あるリポジトリを索引化すると、攻撃者が指定したバイト列でヒープ領域が壊され、確実にクラッシュするほか、コードが実行されるおそれもあります。修正版は0.9.0です。0.9.0以上に更新してください。

AI要約

SecPulse が外部の生成 AI を使って作った要約です。誤りを含むことがあります。重要な判断の前に、下の原文と参照URLを確認してください。

codebase-memory-mcpの0.9.0より前のバージョンには、.codebase-memory/の成果物を自動で取り込む処理に整数の切り捨てによるヒープバッファオーバーフローの脆弱性があります。悪意あるリポジトリを索引化すると、攻撃者が指定したバイト列でヒープ領域が壊され、確実にクラッシュするほか、コードが実行されるおそれもあります。修正版は0.9.0です。0.9.0以上に更新してください。

影響パッケージ

パッケージ影響を受ける版 → 修正版
DeusDatacodebase-memory-mcp —
npmcodebase-memory-mcp
0.9.0 未満→ 0.9.0
PyPIcodebase-memory-mcp
0.9.0 未満→ 0.9.0
pipcodebase-memory-mcp
0.9.0 未満→ 0.9.0
原文の説明 取得元が公開している説明をそのまま載せています (多くは英語)。

Summary

When a repository contains a .codebase-memory/ artifact, indexing it imports the artifact automatically. Before 0.9.0 the decompression buffer was allocated with the 64-bit original_size from the attacker-controlled artifact.json, but the capacity handed to the Zstandard decompressor was truncated to int. A size with bit 31 set became negative, was sign-extended back to a huge size_t, and the decompressor wrote the frame's full content past the real allocation.

Impact

Indexing a malicious repository could corrupt heap memory with attacker-controlled bytes: a reliable crash and potentially code execution. No extra interaction beyond indexing the repository is needed.

Patches

Fixed in stable 0.9.0. The import path takes the decompressed size from the Zstandard frame header, validates it against the metadata and a size cap, and uses the same size_t capacity for allocation and decompression. The decoded length is checked. codebase-memory-mcp has verified this correction in published v0.12.1, together with the size-mismatch regression. That regression is not a direct multi-gigabyte reproduction; this advisory does not claim that all decompression resource-exhaustion cases are eliminated.

Workarounds

Upgrade to a fixed release; the codebase-memory-mcp verified recommendation is v0.12.1. On affected versions, avoid indexing untrusted repositories that contain a .codebase-memory/ artifact.

Credit

Reported privately by Aaron (@aaronjmars)…

出典: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory

参照URL

当サイトでは、アクセス解析と広告の効果測定のためにCookieを使います。株式会社Gameのサイト共通の設定です。 詳しく