GHSA-vpgh-g3jg-ggx9

Suggest an improvement
Source
https://github.com/advisories/GHSA-vpgh-g3jg-ggx9
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-vpgh-g3jg-ggx9/GHSA-vpgh-g3jg-ggx9.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-vpgh-g3jg-ggx9
Aliases
Published
2026-12-01T00:37:12Z
Modified
2026-12-01T00:45:07Z
Severity
  • 7.8 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
codebase-memory-mcp: Stack out-of-bounds write in query_graph via a RETURN or WITH clause with more than 32 items
Details

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.

Database specific
{
    "cwe_ids":  [
        "CWE-121",
        "CWE-787"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-12-01T00:37:12Z",
    "nvd_published_at":  "2026-11-20T20:17:10Z",
    "severity":  "HIGH"
}
References

Affected packages

npm / codebase-memory-mcp

Package

Name
codebase-memory-mcp
View open source insights on deps.dev
Purl
pkg:npm/codebase-memory-mcp

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
0.9.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-vpgh-g3jg-ggx9/GHSA-vpgh-g3jg-ggx9.json"

PyPI / codebase-memory-mcp

Package

Name
codebase-memory-mcp
View open source insights on deps.dev
Purl
pkg:pypi/codebase-memory-mcp

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
0.9.0

Affected versions

0.*
0.8.1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-vpgh-g3jg-ggx9/GHSA-vpgh-g3jg-ggx9.json"