{"id":"CVE-2026-114495","aliases":["CVE-2026-114495","GHSA-8xwq-xv2x-853r"],"related":[],"kind":"vulnerability","state":"published","title":"codebase-memory-mcp: Heap buffer overflow on artifact import via int-truncated decompression capacity","summary":"codebase-memory-mcp provides local code intelligence for developers and AI agents through a persistent graph and MCP tools. Prior to 0.9.0, automatic import of a repository's .codebase-memory/ artifact allocated a decompression buffer using the attacker-controlled 64-bit original_size value from artifact.json but truncated that value to int when passing the destination capacity to the Zstandard decompressor. A value with bit 31 set became negative and was sign-extended to a large size_t, allowing the decompressor to write frame content beyond the actual allocation. Indexing a malicious repository containing the crafted artifact could corrupt heap memory with attacker-controlled bytes, causing a reliable crash and potentially code execution. This issue is fixed in version 0.9.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"codebase-memory-mcp provides local code intelligence for developers and AI agents through a persistent graph and MCP tools. Prior to 0.9.0, automatic import of a repository's .codebase-memory/ artifact allocated a decompression buffer using the attacker-controlled 64-bit original_size value from artifact.json but truncated that value to int when passing the destination capacity to the Zstandard decompressor. A value with bit 31 set became negative and was sign-extended to a large size_t, allowing the decompressor to write frame content beyond the actual allocation. Indexing a malicious repository containing the crafted artifact could corrupt heap memory with attacker-controlled bytes, causing a reliable crash and potentially code execution. This issue is fixed in version 0.9.0.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nWhen a repository contains a `.codebase-memory/` artifact, indexing it imports the artifact automatically. Before 0.9.0 the decompression buffer was allocated with the 64-bit `original_size` from the attacker-controlled `artifact.json`, but the capacity handed to the Zstandard decompressor was truncated to `int`. A size with bit 31 set became negative, was sign-extended back to a huge `size_t`, and the decompressor wrote the frame's full content past the real allocation.\n\n### Impact\n\nIndexing a malicious repository could corrupt heap memory with attacker-controlled bytes: a reliable crash and potentially code execution. No extra interaction beyond indexing the repository is needed.\n\n### Patches\n\nFixed in stable 0.9.0. The import path takes the decompressed size from the Zstandard frame header, validates it against the metadata and a size cap, and uses the same size_t capacity for allocation and decompression. The decoded length is checked. codebase-memory-mcp has verified this correction in published v0.12.1, together with the size-mismatch regression. That regression is not a direct multi-gigabyte reproduction; this advisory does not claim that all decompression resource-exhaustion cases are eliminated.\n\n### Workarounds\n\nUpgrade to a fixed release; the codebase-memory-mcp verified recommendation is v0.12.1. On affected versions, avoid indexing untrusted repositories that contain a .codebase-memory/ artifact.\n\n### Credit\n\nReported privately by Aaron (@aaronjmars). codebase-memory-mcp thanks them for the precise report and re-verification.","format":"markdown","source":"ghsa"}],"published":"2026-11-20T19:54:54.880Z","modified":"2026-12-01T01:00:04.488Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-190","CWE-681","CWE-787"],"affected":[{"ranges":[{"version":"< 0.9.0","status":"affected"}],"vendor":"DeusData","product":"codebase-memory-mcp","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.9.0"}],"ecosystem":"npm","package":"codebase-memory-mcp","purl":"pkg:npm/codebase-memory-mcp","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.9.0"}],"ecosystem":"PyPI","package":"codebase-memory-mcp","purl":"pkg:pypi/codebase-memory-mcp","source":"ghsa"}],"references":[{"url":"https://github.com/DeusData/codebase-memory-mcp/security/advisories/GHSA-8xwq-xv2x-853r","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/DeusData/codebase-memory-mcp/pull/941","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/DeusData/codebase-memory-mcp/commit/a2f09c7ce97205147f127c2c8b12861bf74a02a3","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/DeusData/codebase-memory-mcp/releases/tag/v0.9.0","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-114495","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/DeusData/codebase-memory-mcp","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-11-25T04:31:56.628Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-114495","url":"https://www.cve.org/CVERecord?id=CVE-2026-114495","licence":"CVE Terms of Use","modified":"2026-11-25T04:32:06.995Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-8xwq-xv2x-853r","url":"https://github.com/advisories/GHSA-8xwq-xv2x-853r","licence":"CC-BY-4.0","modified":"2026-12-01T01:00:04.488Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-114495","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-114495","licence":"Public domain","modified":"2026-11-25T05:18:26.610Z"}],"updatedAt":"2026-12-01T01:27:25.959Z","epss":{"score":0.00237,"percentile":0.1575,"date":"2026-12-01T12:00:22.000Z"}}