Security advisory2026-12-01codebase-memory-mcp projectSecurity advisory

codebase-memory-mcp: git option injection through base_branch in detect_changes allows writing a file outside the project

Before 0.9.0 the base_branch argument of the detect_changes tool was checked for shell metacharacters but not for a leading dash.

What happened

  • codebase-memory-mcp: git option injection through base_branch in detect_changes allows writing a file outside the projectSecurity Advisory GHSA-2vj2-hwgx-6f23
  • 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.Advisory description (GHSA-2vj2-hwgx-6f23)

The failure pattern

Watch the pattern: AI action exceeds its intended scope

Related standards

CollectSEA's mapping through this incident's failure pattern; not an official determination by the standards bodies.

Building something similar?

Describe your design and see every precedent that applies, with safeguards you can hand to your coding agent.

Analyze your design
Security advisory2026-12-01AI agent

Security issue reported in mcp-use

A vulnerability was determined in mcp-use up to 1.7.1. Affected by this vulnerability is the function build_namespace of the file libraries/python/mcp_use/client/code_executor.py of the component CodeExecutor.

AI action exceeds its intended scopenvd.nist.gov