{"id":"GHSA-2vj2-hwgx-6f23","summary":"codebase-memory-mcp: git option injection through base_branch in detect_changes allows writing a file outside the project","details":"### Summary\n\nBefore 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=\u003cpath\u003e` made git write its diff to a caller-chosen file.\n\n### Impact\n\nA 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.\n\n### Patches\n\nFixed 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.\n\n### Workarounds\n\nUpgrade to a fixed release. codebase-memory-mcp recommends v0.12.1, which was verified to contain this fix.\n\n### Credit\n\nReported privately by Aaron (@aaronjmars). codebase-memory-mcp thanks them for the report and re-verification.","aliases":["CVE-2026-114496"],"modified":"2026-12-01T01:00:04.490199074Z","published":"2026-12-01T00:41:55Z","database_specific":{"github_reviewed":true,"github_reviewed_at":"2026-12-01T00:41:55Z","nvd_published_at":"2026-11-20T20:17:11Z","cwe_ids":["CWE-88"],"severity":"MODERATE"},"references":[{"type":"WEB","url":"https://github.com/DeusData/codebase-memory-mcp/security/advisories/GHSA-2vj2-hwgx-6f23"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-114496"},{"type":"WEB","url":"https://github.com/DeusData/codebase-memory-mcp/pull/941"},{"type":"WEB","url":"https://github.com/DeusData/codebase-memory-mcp/commit/72e6a14adb50a37a245eb6ec79c9eb31eee48951"},{"type":"PACKAGE","url":"https://github.com/DeusData/codebase-memory-mcp"},{"type":"WEB","url":"https://github.com/DeusData/codebase-memory-mcp/releases/tag/v0.9.0"}],"affected":[{"package":{"name":"codebase-memory-mcp","ecosystem":"npm","purl":"pkg:npm/codebase-memory-mcp"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.9.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-2vj2-hwgx-6f23/GHSA-2vj2-hwgx-6f23.json"}},{"package":{"name":"codebase-memory-mcp","ecosystem":"PyPI","purl":"pkg:pypi/codebase-memory-mcp"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.9.0"}]}],"versions":["0.8.1"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-2vj2-hwgx-6f23/GHSA-2vj2-hwgx-6f23.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N"}]}