MEDIUM · CVSS 3.1 5.5 EPSS 0.2% · 5th percentile CWE-88

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

How to check your project

Automated analysis of the published advisory data, generated 2026-12-01. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
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 vectorLocal
Attack complexityLow
Privileges requiredLow
User interactionNone
ScopeUnchanged
ConfidentialityNone
IntegrityHigh
AvailabilityNone

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
### Summary Before 0.9.0 the `base_branch` argument of the `detect_changes` tool was checked for shell metacharacters but not for a leading dash. The value was placed in the revision position of a `git diff` invocation, so a value shaped like a git option was honoured by git. An option such as `--output=<path>` made git write its diff to a caller-chosen file. ### Impact A caller of detect_changes can create or overwrite a file with Git diff output at a caller-chosen path, subject to the server process's permissions. This is the demonstrated integrity impact; arbitrary code execution was not demonstrated. ### Patches Fixed in stable 0.9.0. Option-like values are rejected before Git is invoked. In the verified v0.12.1 release, both since and its base_branch alias pass through the leading-dash check, and the regression verifies rejection. ### Workarounds Upgrade to a fixed release. codebase-memory-mcp recommends v0.12.1, which was verified to contain this fix. ### Credit Reported privately by Aaron (@aaronjmars). codebase-memory-mcp thanks them for the report and re-verification.

References

Source records: GHSA-2vj2-hwgx-6f23 (OSV.dev) · EPSS by FIRST, 2026-12-01.