{"id":"CVE-2026-114496","aliases":["CVE-2026-114496","GHSA-2vj2-hwgx-6f23"],"related":[],"kind":"vulnerability","state":"published","title":"codebase-memory-mcp: git option injection through base_branch in detect_changes allows writing a file outside the project","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### 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=<path>` 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.","format":"markdown","source":"ghsa"}],"published":"2026-11-20T19:52:27.866Z","modified":"2026-12-01T01:00:04.490Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","score":5.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-88"],"affected":[{"ranges":[{"version":"< 0.9.0","status":"affected"}],"vendor":"DeusData","product":"codebase-memory-mcp","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.9.0"}],"ecosystem":"npm","package":"codebase-memory-mcp","purl":"pkg:npm/codebase-memory-mcp","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.9.0"}],"ecosystem":"PyPI","package":"codebase-memory-mcp","purl":"pkg:pypi/codebase-memory-mcp","source":"ghsa"}],"references":[{"url":"https://github.com/DeusData/codebase-memory-mcp/security/advisories/GHSA-2vj2-hwgx-6f23","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/DeusData/codebase-memory-mcp/pull/941","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/DeusData/codebase-memory-mcp/commit/72e6a14adb50a37a245eb6ec79c9eb31eee48951","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/DeusData/codebase-memory-mcp/releases/tag/v0.9.0","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-114496","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/DeusData/codebase-memory-mcp","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-20T20:37:50.157Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-114496","url":"https://www.cve.org/CVERecord?id=CVE-2026-114496","licence":"CVE Terms of Use","modified":"2026-11-20T20:37:57.304Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2vj2-hwgx-6f23","url":"https://github.com/advisories/GHSA-2vj2-hwgx-6f23","licence":"CC-BY-4.0","modified":"2026-12-01T01:00:04.490Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-114496","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-114496","licence":"Public domain","modified":"2026-11-20T21:17:28.000Z"}],"updatedAt":"2026-12-01T01:27:25.968Z","epss":{"score":0.00295,"percentile":0.23766,"date":"2026-12-01T12:00:22.000Z"}}