What happened
Before 0.0.845 the shell-command tool validated only the base command and let an allowlisted xargs launch an unlisted interpreter; the filter also missed Python code using subprocess. An attacker steering a model-issued command could execute arbitrary code outside the project root as the process user (CVSS 7.3, local, user interaction required).
Why it matters
RAG systems that let a model run shell commands to understand or edit a codebase create a direct model-to-host code-execution path. This flaw lets a prompt-injected model issue a command that escapes the project sandbox entirely.
Attack vector
execute_shell_command validates only the base command, not the program launched by allowlisted xargs, and the dangerous-pattern filter misses Python interpreter code that imports subprocess instead of os. An attacker influencing a model-issued command can execute code outside the project root after human approval in default mode, or with no approval in --yolo mode (CWE-78/CWE-863).
Affected systems
vitali87 code-graph-rag <= 0.0.844 (fixed in 0.0.845)
Mitigation
Upgrade to v0.0.845 (advisory GHSA-wvxg-744g-6pcg).