Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessVictim indexes attacker-supplied repository
-
DeliveryAuto-import of crafted .codebase-memory/ artifact
-
Exploitint-truncated original_size sign-extends to huge size_t
-
ExecutionZstd writes frame past allocation
-
PersistHeap corrupted with attacker bytes
-
ImpactCrash or potential code execution
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer overflow checks
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the victim to index - or auto-index via the auto_index feature - an untrusted repository that contains a crafted .codebase-memory/ artifact whose artifact.json carries an attacker-controlled 64-bit original_size with bit 31 set; on affected versions below 0.9.0 the import path passes that size truncated to int as the decompressor's destination capacity. Limiting factors: the vector is local (the malicious artifact must be present and indexed on the host, AV:L) and requires user interaction (UI:R) in the form of indexing the repository; it is most relevant where the server is driven by untrusted callers (agentic or multi-tenant deployments). The vendor's only complete fix is upgrading to a fixed release (recommended v0.12.1); on affected versions the stated workaround is to avoid indexing untrusted repositories containing a .codebase-memory/ artifact, and the new CBM_ALLOWED_ROOT setting can restrict index_repository to a trusted directory. |
| Impact | Severity signals are moderately strong but local. The CVSS vector (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H, base 7.8) describes a local attack (AV:L) that requires user interaction (UI:R) - the victim must index a repository that carries the attacker's crafted .codebase-memory/ artifact - but no authentication (PR:N), low complexity (AC:L), and full confidentiality/integrity/availability impact once triggered. No EPSS score is provided, this CVE is NOT in CISA KEV, and no public exploit is identified in the input (the four references are the GHSA advisory, fixing PR #941, the fix commit, and the v0.9.0 release - all remediation, not proof-of-concept). The vuln.today decision label is 'this_week', consistent with a serious-but-not-emergency bug: a deterministic int-truncation of a 64-bit original_size that sign-extends into a huge size_t and lets the Zstandard decompressor write past the allocation (CWE-190 feeding a CWE-787 heap overflow). The advisory itself frames outcome as 'a reliable crash and potentially code execution' - so RCE is plausible, not demonstrated. Net: this is a real priority for anyone running codebase-memory-mcp against untrusted repositories (agentic/multi-tenant setups especially), but the local vector and indexing-interaction requirement keep it below the mass-exploitation tier. No EPSS is available to independently gauge exploitation probability. |
| Exploit ScenarioDerived | An attacker publishes or supplies a repository containing a malicious .codebase-memory/ artifact whose artifact.json sets original_size with bit 31 set; when a developer or AI agent indexes that repository, the import path truncates the size to int, sign-extends it to a large size_t, and the Zstandard decompressor writes attacker-controlled frame bytes past the real heap allocation. This reliably crashes the process and could lead to code execution. No public exploit code is identified in the provided data; the attack requires only that the victim index the untrusted repository (UI:R). |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 20, 2026
Heap memory corruption in codebase-memory-mcp before 0.9.0 lets a crafted repository artifact corrupt memory during automatic indexing. The importer allocates its decompression buffer from the attacker-controlled 64-bit original_size field in artifact.json, but passes that capacity to the Zstandard decompressor after truncating it to int; a value with bit 31 set turns negative and is sign-extended into a huge size_t, so frame content is written past the real allocation with attacker-controlled bytes. Indexing - or auto-indexing - a malicious repository yields a reliable crash and potentially code execution, and because the vector is local (AV:L) with user interaction required (UI:R), the practical exposure is greatest where the MCP server is driven by untrusted callers such as agentic or multi-tenant deployments; no public exploit code was identified at time of analysis, and the vendor states upgrading is the only complete fix, with v0.12.1 the verified recommendation. The vendor-released patch is 0.9.0.
RemediationAI
Upgrade to codebase-memory-mcp 0.9.0 or later - the vendor-released patch is 0.9.0, and the vendor's verified recommendation is v0.12.1, where the frame-header-derived sizing, metadata validation, size cap and decoded-length check were re-verified together with the size-mismatch regression. Because the vendor is explicit that upgrading is the only complete fix, treat the following as interim measures on affected versions: do not index untrusted repositories that contain a .codebase-memory/ artifact (this blocks the import path entirely but forgoes the feature for third-party code), and set CBM_ALLOWED_ROOT to restrict index_repository to paths within a trusted directory, which refuses any repo_path resolving outside that root after symlink and '..' resolution - the trade-off is that unset imposes no restriction and once set it will also reject legitimate indexing outside the configured root, so agentic or multi-tenant servers should point it at exactly the repositories they intend to serve. Disabling automatic artifact import / auto_index on affected builds removes the unattended trigger, at the cost of requiring manual review of each repository. Advisory and fix references: https://github.com/DeusData/codebase-memory-mcp/security/advisories/GHSA-8xwq-xv2x-853r, https://github.com/DeusData/codebase-memory-mcp/pull/941, https://github.com/DeusData/codebase-memory-mcp/commit/a2f09c7ce97205147f127c2c8b12861bf74a02a3, https://github.com/DeusData/codebase-memory-mcp/releases/tag/v0.9.0.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
codebase-memory-mcp is an MCP (Model Context Protocol) server that gives developers and AI agents local code intelligence via a persistent graph, and it automatically imports a .codebase-memory/ artifact when a repository is indexed. The vulnerable path is a C helper (internal/cbm/zstd_store.c) wrapping Zstandard: cbm_zstd_decompress took int-typed srcLen/dstCap, so the 64-bit original_size read from the artifact.json metadata was narrowed to int before being handed to ZSTD_decompress as a size_t destination capacity. When bit 31 is set the int becomes negative and sign-extends back to a very large size_t, desynchronising the decoder's assumed capacity from the actual heap allocation - the textbook CWE-190 integer overflow/wraparound (the advisory also maps CWE-681 incorrect conversion and CWE-787 out-of-bounds write) that lets the decompressor write the frame's full content past the buffer. The upstream fix removes the int boundary entirely (size_t parameters, int64_t return) and, more importantly, stops trusting the metadata field: cbm_zstd_frame_content_size() reads the declared content size from the Zstandard frame header, validates it against the metadata and a size cap, allocates and decompresses with the same size_t capacity, and checks the decoded length. The same pull request adds a CBM_ALLOWED_ROOT option restricting index_repository to paths inside a trusted directory, and bounds unrelated parser/CLI code paths.
Know when Codebase Memory Mcp gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Attacker-supplied artifact must be indexed locally (AV:L, UI:R) with no auth (PR:N); deterministic truncation makes it low-complexity (AC:L) with heap corruption yielding full C/I/A impact.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
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.
Technical POC Analysis
The advisory attributes this to CWE-190 (Integer Overflow or Wraparound), with CWE-681 (Incorrect Conversion between Numeric Types) and CWE-787 (Out-of-bounds Write) listed as the resulting weaknesse…
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
CVE-2026-114495 is a high-severity heap memory corruption flaw in codebase-memory-mcp versions before 0.9.0 that can be triggered when the tool automatically indexes a malicious repository artifact. This puts development environments and multi-tenant MCP server deployments at risk of crashes and potential remote code execution, particularly where untrusted users or automated agents can feed code into the system. Leadership should prioritize patching because exploitation requires only a crafted repository and user interaction, and the vulnerability directly threatens code integrity and service availability.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
More in Codebase Memory Mcp
View allStack memory corruption in codebase-memory-mcp before 0.9.0 allows any caller of the query_graph MCP tool to reliably cr
Denial of service in codebase-memory-mcp before version 0.10.0: the indexer's own .gitignore matcher implements * and **
Git option injection in the codebase-memory-mcp MCP server before 0.9.0 lets a local, authenticated caller of the detect
Arbitrary process termination on Windows hosts running the optional graph UI of codebase-memory-mcp: the POST /api/proce
EUVD-2026-131805
NVD
CVE.org
EPSS
GitHub
Exploit-DB