CVE-2026-137185: Code Graph RAG: EXECUTE_SHELL allowlist and dangerous-pattern blacklist both miss xargs <interpreter> -c — approved/yolo shell commands reach unconfined RCE
Code Graph RAG is an AI-powered knowledge graph and retrieval system for querying, understanding, and editing multi-language codebases. In 0.0.844 and earlier, executeshellcommand in codebaserag/tools/shellcommand.py validates only the base command, not the program launched by allowlisted xargs. Its dangerous-pattern filter misses Python interpreter code using modules such as subprocess instead of importing os, allowing an unlisted interpreter to execute arbitrary code. An attacker influencing a model-issued command can execute code outside the project root as the process user after human approval in default mode, or without approval in --yolo mode. The noninteractive shell wrapper does not allow xargs. This issue is fixed in 0.0.845.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 0.0.845
Event History
Frequently Asked Questions
Which deployment modes are affected?
Default mode is affected when a human approves the model-issued command. Deployments using --yolo mode are affected without human approval. The noninteractive shell wrapper is not affected because it does not allow xargs.
What does an attacker need to exploit this issue?
An attacker needs to influence a command issued by the model so that it uses allowlisted xargs to launch an interpreter with -c. In default mode, the command must also receive human approval; in --yolo mode, approval is not required.
What is the impact of successful exploitation?
Successful exploitation allows arbitrary code execution outside the project root with the privileges of the Code Graph RAG process user. Confidentiality, integrity, and availability can all be affected.
What version fixes the issue?
The issue is fixed in Code Graph RAG 0.0.845. Versions 0.0.844 and earlier are affected.