HIGH · CVSS 3.1 7.8 EPSS 0.2% · 4th percentile CWE-121CWE-787

CVE-2026-114494: codebase-memory-mcp: Stack out-of-bounds write in query_graph via a RETURN or WITH clause with more than 32 items

Published 2026-12-01 · Updated 2026-12-01 · Also known as GHSA-vpgh-g3jg-ggx9

Summary

A stack out-of-bounds write vulnerability exists in the codebase-memory-mcp Cypher parser due to unbounded projection items in RETURN or WITH clauses. All users running affected versions of the codebase-memory-mcp package should upgrade immediately.

Who is affected

Local callers of the query_graph tool can trigger stack memory corruption in the server process by supplying more than 32 projection items, leading to reliable crashes or potentially worse outcomes. This vulnerability is reachable by any caller, including an agent whose queries are influenced by untrusted content.

Exploitability

The vulnerability requires local access with low privileges and no user interaction, scoring a CVSS base score of 7.8 with high impacts on confidentiality, integrity, and availability. The EPSS score is 0.002, and it is not currently listed in the CISA Known Exploited Vulnerabilities catalog.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-12-01. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
PyPI codebase-memory-mcp >= 0, < 0.9.0 0.9.0 python -m pip install 'codebase-memory-mcp>=0.9.0'
npm codebase-memory-mcp >= 0, < 0.9.0 0.9.0 npm install [email protected]

CVSS 3.1 vector

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Attack vectorLocal
Attack complexityLow
Privileges requiredLow
User interactionNone
ScopeUnchanged
ConfidentialityHigh
IntegrityHigh
AvailabilityHigh

FAQ

What causes the out-of-bounds write in codebase-memory-mcp?

The Cypher parser did not bound the number of projection items in a RETURN or WITH clause, while the projection executors indexed fixed 32-element stack arrays using a loop bounded by the parsed count.

Which packages and versions are affected?

Both the PyPI and npm packages for codebase-memory-mcp introduced in versions prior to 0.9.0 are affected.

Is there an active exploitation campaign for this vulnerability?

No, CISA Known Exploited Vulnerabilities status is no, meaning active exploitation is not documented.

Original advisory description
### Summary Before 0.9.0 the Cypher parser did not bound the number of projection items in a `RETURN` or `WITH` clause, while the projection executors indexed fixed 32-element stack arrays with a loop bounded by the parsed count. A query with more than 32 projection items written through the `query_graph` tool wrote past those arrays. A related path read uninitialized stack slots when building result columns, even when no node matched. ### Impact Stack memory corruption in the server process from a single tool argument: a reliable crash, and potentially worse depending on layout. Reachable by any caller of `query_graph`, including an agent whose queries are influenced by untrusted content. ### Patches Fixed in stable 0.9.0. Projection counts are checked before execution. In the verified v0.12.1 release, RETURN is bounded to 32 items and WITH to 16 items; oversized clauses are rejected rather than silently truncated. Both projection-limit regressions passed in the release-source verification. ### Workarounds Upgrade to a fixed release. codebase-memory-mcp recommends v0.12.1, which has been verified to contain this fix. ### Credit Reported privately by Aaron (@aaronjmars). codebase-memory-mcpthanks them for the thorough report and re-verification.

References

Source records: GHSA-vpgh-g3jg-ggx9 (OSV.dev) · EPSS by FIRST, 2026-12-01.