← All advisories
CVE-2026-114495highCode execution2026-11-20

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.

01.

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).

02.

How to check

  1. Check the installed version: npm ls -g codebase-memory-mcp, pip show codebase-memory-mcp, or the binary's version flag.
  2. On older versions, check whether any repository you index contains a .codebase-memory/ directory you didn't create.
03.

How to fix

  1. Upgrade codebase-memory-mcp to 0.9.0 or later; the maintainers recommend 0.12.1.
  2. 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
04.

Sources

More advisories for this tool
The weekly email

One email a week. Only what changed.

Every new security hole in AI coding tools, MCP servers, app builders and the stacks they generate (Next.js, Supabase, Node, PHP), each with how to check your app and the fix. No roundups of things you already read.

Free, one email a week. Read the latest issue first if you like. One-click unsubscribe in every email. We never sell or share addresses.