codebase-memory-mcp: indexing a malicious repository could overflow the heap via a crafted .codebase-memory artifact, and a long query_graph query overflowed the stack (CVE-2026-114495, CVE-2026-114494; fixed 0.9.0)
codebase-memory-mcp gives AI coding agents a persistent code graph through MCP tools. Before 0.9.0, indexing a repository automatically imported its .codebase-memory/ artifact, and the size from the attacker-controlled artifact.json was truncated to int when passed to the Zstandard decompressor, so a crafted artifact made it write attacker-controlled bytes past the heap buffer: a reliable crash and potentially code execution, with no step beyond indexing the repo (CVE-2026-114495). Separately, the Cypher parser allowed more than 32 items in RETURN/WITH while the executors used fixed 32-slot stack arrays, so a single query_graph call, including one an agent writes under prompt-injected instructions, corrupted the stack (CVE-2026-114494). Both fixed in 0.9.0; the maintainers recommend 0.12.1.
What it is
CVE-2026-114495 (GHSA-8xwq-xv2x-853r): heap buffer overflow on artifact import. The fix takes the decompressed size from the Zstandard frame header, checks it against the metadata and a size cap, and uses the same size_t for allocation and decompression.
CVE-2026-114494 (GHSA-vpgh-g3jg-ggx9): stack out-of-bounds write and uninitialised read in query_graph projection handling. Projection counts are now checked before execution.
Affected: codebase-memory-mcp < 0.9.0 (npm, PyPI and release binaries). 0.9.0 was released on 8 July 2026; GitHub published the advisories on 17 November 2026 and NVD the CVEs on 20 November 2026. Both were reported by Aaron (@aaronjmars).
How to check
- Check the installed version: npm ls -g codebase-memory-mcp, pip show codebase-memory-mcp, or the binary's version flag.
- On older versions, check whether any repository you index contains a .codebase-memory/ directory you didn't create.
How to fix
- Upgrade codebase-memory-mcp to 0.9.0 or later; the maintainers recommend 0.12.1.
- Until then, don't index untrusted repositories that contain a .codebase-memory/ artifact.
npm ls -g codebase-memory-mcp; pip show codebase-memory-mcp 2>/dev/null | grep -i '^version'
# repos that ship a prebuilt artifact
find ~/code -maxdepth 3 -type d -name .codebase-memory Sources
- criticalMalicious npm package @guicai777/mcp-doctor posed as an MCP diagnostic tool and dropped a hidden Windows executable, with a README telling users to run mshta (MAL-2026-20295)
- criticalCVE-2026-77359: Jupyter MCP Server's /api/connect and /api/stop routes skipped the token and Origin checks, so a website or network caller could repoint it to an attacker's Jupyter backend (fixed 1.0.3)
- criticalMalicious npm packages posing as AI SDKs and MCP servers: character-ai-sdk, char-ai-sdk, @mibbp/agent-observer, mrnima-openai-chatgpt-bot and @fdcasj_dfew/md-doc-mcp
- criticalCVE-2026-76807: Doist's official Todoist MCP HTTP server let any website use DNS rebinding to read, create and delete your Todoist data (fixed 10.3.3)