CVE-2026-114496: codebase-memory-mcp: git option injection through base_branch in detect_changes allows writing a file outside the project
Published 2026-12-01 · Updated 2026-12-01 · Also known as GHSA-2vj2-hwgx-6f23
Summary
The codebase-memory-mcp package contains a git option injection vulnerability due to insufficient validation of the base_branch parameter. Users of versions prior to 0.9.0 should update their dependencies to prevent unauthorized file creation or overwriting.
Who is affected
An attacker can exploit the detect_changes tool by providing a malicious base_branch argument formatted as a git option, such as --output. This allows the process to write git diff content to arbitrary paths on the filesystem, restricted only by the permissions of the user running the server process. No arbitrary code execution has been demonstrated in this flaw.
Exploitability
The vulnerability carries a CVSS score of 5.5, indicating a medium-severity local attack vector that requires low privileges and no user interaction. With an EPSS score of 0.002, the threat is currently assessed as having a low probability of exploitation in the wild, and it is not listed in the CISA Known Exploited Vulnerabilities catalog.
Remediation
- Upgrade codebase-memory-mcp to version 0.9.0 or later.
- Verify the installation of version 0.12.1 for the most complete security fixes and regression testing.
How to check your project
- Inspect dependency management files such as requirements.txt or package.json for codebase-memory-mcp versions lower than 0.9.0.
- Use software composition analysis (SCA) tools to scan the project for the affected PyPI and npm package identifiers.
Automated analysis of the published advisory data, generated 2026-12-01. Not human-reviewed; verify against the official advisory. How this works.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | Upgrade |
|---|---|---|---|---|
| PyPI | codebase-memory-mcp |
>= 0, < 0.9.0 | 0.9.0 | python -m pip install 'codebase-memory-mcp>=0.9.0' |
| npm | codebase-memory-mcp |
>= 0, < 0.9.0 | 0.9.0 | npm install [email protected] |
CVSS 3.1 vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
| Attack vector | Local |
|---|---|
| Attack complexity | Low |
| Privileges required | Low |
| User interaction | None |
| Scope | Unchanged |
| Confidentiality | None |
| Integrity | High |
| Availability | None |
FAQ
Does this vulnerability allow for arbitrary code execution?
No, arbitrary code execution was not demonstrated by the researchers; the primary impact is limited to file integrity through the ability to create or overwrite files.
Is this vulnerability currently being exploited in the wild?
No, there is no evidence of active exploitation, and the vulnerability is not included in the CISA Known Exploited Vulnerabilities (KEV) list.
What specifically caused the security flaw?
The flaw was caused by the detect_changes tool checking for shell metacharacters but failing to validate against parameters starting with a dash, which allowed them to be interpreted as git command-line options.
Original advisory description
References
- WEB https://github.com/DeusData/codebase-memory-mcp/security/advisories/GHSA-2vj2-hwgx-6f23
- ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2026-114496
- WEB https://github.com/DeusData/codebase-memory-mcp/pull/941
- WEB https://github.com/DeusData/codebase-memory-mcp/commit/72e6a14adb50a37a245eb6ec79c9eb31eee48951
- PACKAGE https://github.com/DeusData/codebase-memory-mcp
- WEB https://github.com/DeusData/codebase-memory-mcp/releases/tag/v0.9.0
Source records: GHSA-2vj2-hwgx-6f23 (OSV.dev) · EPSS by FIRST, 2026-12-01.