Stack out-of-bounds write in query_graph via a RETURN or WITH clause with more than 32 items in DeusData/codebase-memory-mcp
In codebase-memory-mcp below 0.9.0, the Cypher parser did not bound the number of items in a RETURN or WITH clause, while the code that ran the query indexed fixed 32-element stack arrays using the parsed count. A query with more than 32 items in such a clause, sent through the query_graph tool, wrote past those arrays. A related path read uninitialized stack slots when it built result columns, even when no node matched. The result was stack memory corruption in the server process from a single tool argument: a reliable crash, and potentially worse depending on layout. Any caller of query_graph could reach it, including an agent whose queries are shaped by untrusted content. The fix in 0.9.0 checks projection counts before execution. In the verified 0.12.1 release, RETURN is bounded to 32 items and WITH to 16, and oversized clauses are rejected rather than silently truncated. The advisory lists codebase-memory-mcp below 0.9.0 as affected on npm and pip, and 0.9.0 as patched. CVE-2026-114494 is assigned.
- Affected artifact
- DeusData/codebase-memory-mcp — query_graph tool (Cypher RETURN/WITH projection handling)mcp server
- Affected versions
- codebase-memory-mcp ≥ 0 to < 0.9.0; codebase-memory-mcp ≥ 0 to < 0.9.0
- Fixed in
- 0.9.0
- Last verified
- 2026-12-05
- Upstream aliases
- GHSA-vpgh-g3jg-ggx9CVE-2026-114494
Severity
CVSS 4.0 score 7.8 (High), scored by HOL.
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
What this means
GHSA-vpgh-g3jg-ggx9 / CVE-2026-114494: in codebase-memory-mcp, a query_graph RETURN or WITH clause with more than 32 items wrote past fixed 32-element stack arrays. Fixed in 0.9.0; upgrade from below 0.9.0.
What to do
Upgrade codebase-memory-mcp to 0.9.0 or later; the advisory's verified recommendation is v0.12.1. On affected versions, do not let untrusted content shape query_graph queries with large RETURN or WITH clauses.
Evidence
Precondition. A caller able to send a query with more than 32 projection items to the query_graph tool, on codebase-memory-mcp below 0.9.0.
Source proof. Per the advisory, a query_graph query whose RETURN or WITH clause carries more than 32 projection items writes past the fixed 32-element stack arrays in the projection executors. HOL did not run the server; this rests on the advisory.
Version determination. Determined by range — The advisory states codebase-memory-mcp below 0.9.0 is affected on npm and pip, patched in 0.9.0.
Disclosure
Disclosure state: independent public · Publisher: DeusData/codebase-memory-mcp
Naming decision: named. Vendor named as drafted. Finding already public with fix published; naming call sits with this job under Nov 24-25 2026 rules.
Vendor response: fixed — Fix published in 0.9.0.
2026-11-17 · vendor action
Maintainers published advisory GHSA-vpgh-g3jg-ggx9 with the fix in 0.9.0.
2026-12-05 · guard update
Status moved from draft to triaged: Transition to triaged: record is in scope, sources are primary, finding already public and fixed upstream in 0.9.0, CVE-2026-114494 assigned.
2026-12-05 · guard update
Status moved from triaged to evidence_verified: Transition to evidence_verified: record is in scope, sources are primary, finding already public and fixed upstream in 0.9.0, CVE-2026-114494 assigned.
2026-12-05 · disclosure
Status moved from evidence_verified to public: Transition to public: record is in scope, sources are primary, finding already public and fixed upstream in 0.9.0, CVE-2026-114494 assigned.
Affected artifact references
Cite this record
[HOL-VULN-2026-0024] Stack out-of-bounds write in query_graph via a RETURN or WITH clause with more than 32 items in DeusData/codebase-memory-mcp — HOL Agent Vulnerability Ledger, HOL (hol.org), 2026. https://hol.org/guard/security/vulnerabilities/hol-vuln-2026-0024
Canonical URL: https://hol.org/guard/security/vulnerabilities/hol-vuln-2026-0024
Found an error in this record, or want to appeal it? Report an issue or appeal.
Appeal or correct this record
Maintainers and affected parties can submit evidence, dispute the record, or request a correction through the disclosure page. A dispute marks the record visibly disputed — it never silently disappears.