Skip to main content

codebase-memory-mcp EUVDEUVD-2026-131805

| CVE-2026-114495 HIGH
Integer Overflow or Wraparound (CWE-190)
2026-11-20 GitHub_M
7.8
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Victim indexes attacker-supplied repository
  2. Delivery
    Auto-import of crafted .codebase-memory/ artifact
  3. Exploit
    int-truncated original_size sign-extends to huge size_t
  4. Execution
    Zstd writes frame past allocation
  5. Persist
    Heap corrupted with attacker bytes
  6. Impact
    Crash 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).

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

codebase-memory-mcp < 0.9.0

Affected Packages

euvd codebase_memory_mcp fix: 0.9.0

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

Vendor (GitHub_M) PRIMARY 7.8 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
vuln.today AI 7.8 HIGH

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.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Patch available
Nov 20, 2026 - 21:04 EUVD
CVE Published
Nov 20, 2026 - 19:54 cve.org
HIGH 7.8

DescriptionCVE.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

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 85% exploitable
Prevalence
Low
niche developer/AI-agent MCP tool, limited production deployment footprint
Social Media
1
Sightings
Data Quality
3 sources
Confidence: Low

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
High

Priority Score

39
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +39
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy