Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessInvoke detect_changes MCP tool
-
DeliverySupply option-shaped base_branch (--output=path)
-
ExploitGit honours it as an option not a revision
-
ExecutionGit writes diff to caller-chosen file
-
ImpactCreate or overwrite target file as server process
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Argument sanitization
|
| Exploitation Conditions | Exploitation requires a caller able to invoke the detect_changes tool and supply the base_branch argument with an option-shaped value (e.g. --output=<path>) that git interprets as a command option in the revision position of its git diff invocation. It is limited by the server process's filesystem permissions (writes occur only where that process can write), by needing caller access to the MCP tool (PR:L), and by being a local vector against the running server; arbitrary code execution was not demonstrated, so the outcome is confined to creating/overwriting a file with Git diff output. Versions before 0.9.0 are affected; 0.9.0 (and verified v0.12.1) reject option-like values before git is invoked. |
| Impact | This is a medium-severity, local-access integrity flaw rather than a high-priority emergency. The supplied CVSS vector (AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N = 5.5) indicates an attacker who can already invoke the detect_changes MCP tool (PR:L) against the local server, with no user interaction and low complexity, achieving a high integrity impact but no confidentiality or availability loss. No EPSS score and no KEV listing were provided, and no public exploit was identified at time of analysis - only vendor fix references (GHSA advisory, PR #941, fix commit, v0.9.0 release) are present. The vuln.today decision label is 'this_month', consistent with a real but non-urgent issue. A key conflict: the input Tags assert 'RCE', but the GHSA advisory explicitly states arbitrary code execution was NOT demonstrated - the real impact is creating or overwriting a caller-chosen file with Git diff output under the server process's permissions. Treat this as a scoped file-write/overwrite primitive, not code execution; the RCE label overstates it. |
| Exploit ScenarioDerived | A caller able to invoke the detect_changes tool passes a base_branch value shaped like a Git option, such as '--output=/path/to/target', which pre-0.9.0 passed the shell-metacharacter check but not a leading-dash check. Git honours the option and writes its diff output to the attacker-chosen path, letting the caller create or overwrite a file (e.g. a config or script the server can write) with permissions of the server process. No public exploit code was identified; arbitrary code execution was not demonstrated, so impact is limited to attacker-influenced file write/overwrite. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 20, 2026
Git option injection in the codebase-memory-mcp MCP server before 0.9.0 lets a local, authenticated caller of the detect_changes tool create or overwrite a file of their choosing with Git diff output, subject to the permissions of the server process. The base_branch argument was screened for shell metacharacters but not for a leading dash, so an option-shaped value such as --output=<path> was consumed by git as a command option once it was placed in the revision position of the git diff invocation. The demonstrated impact is integrity only (no confidentiality or availability effect) and stays within the writable scope of the server process; arbitrary code execution was not demonstrated, and no public exploit has been identified at time of analysis.
RemediationAI
Upgrade to codebase-memory-mcp 0.9.0 or later, the release in which option-like base_branch values are rejected before Git is invoked; the vendor specifically recommends v0.12.1, which was re-verified to contain the fix with the leading-dash check applied to both since and its base_branch alias. The advisory documents no alternative workaround beyond upgrading to a fixed release, so deployments that cannot move off a pre-0.9.0 build should restrict which callers can reach the detect_changes MCP tool and run the server under an account whose filesystem write scope is as narrow as possible, accepting that this only limits where an injected --output=<path> can write rather than removing the flaw. Fix references: advisory https://github.com/DeusData/codebase-memory-mcp/security/advisories/GHSA-2vj2-hwgx-6f23, patch https://github.com/DeusData/codebase-memory-mcp/pull/941 and commit https://github.com/DeusData/codebase-memory-mcp/commit/72e6a14adb50a37a245eb6ec79c9eb31eee48951, release 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
The flaw is a classic argument-injection bug (CWE-88) in an MCP server that exposes local code intelligence to developers and AI agents. codebase-memory-mcp's detect_changes tool builds a git diff command and inserts the caller-supplied base_branch value into the revision positional argument. The prior validation filtered shell metacharacters, which addresses shell-level injection but does nothing about git's own option parser: a value beginning with a dash is parsed by git as an option rather than a revision, and git's --output=<file> option redirects diff output to an arbitrary path. Because the write happens with the server process's privileges, reachability is bounded by that process's filesystem permissions. The packaging CPE cpe:2.3:a:deusdata:codebase-memory-mcp:*:*:*:*:*:*:*:* applies to all releases before 0.9.0, which the advisory lists across npm, pip and other distribution channels. The fix rejects option-like values before Git is invoked; the advisory notes that in the verified v0.12.1 release both since and its base_branch alias pass through the leading-dash check and the regression test verifies rejection. The linked pull request and commit bundle this leading-dash rejection together with other hardening changes, and the upstream advisory is the authoritative source for the vulnerability mechanics.
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:L/UI:N/S:U/C:N/I:H/A:N
A caller must invoke the local detect_changes tool (PR:L, AV:L); no metacharacters or race are needed (AC:L); impact is attacker-chosen file write (I:H) with no confidentiality or availability loss.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.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, the detect_changes tool validated the base_branch argument for shell metacharacters but omitted the leading-dash check before placing the value in the revision position of a git diff command. Git therefore interpreted an option-shaped base_branch value, including --output, as a command option instead of a revision, allowing a caller to create or overwrite a caller-chosen file with Git diff output under the server process's permissions. Arbitrary code execution was not demonstrated. This issue is fixed in version 0.9.0.
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
More in Codebase Memory Mcp
View allHeap memory corruption in codebase-memory-mcp before 0.9.0 lets a crafted repository artifact corrupt memory during auto
Stack 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 **
Arbitrary process termination on Windows hosts running the optional graph UI of codebase-memory-mcp: the POST /api/proce
EUVD-2026-131799
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB