CVE-2026-137185: Code Graph RAG's shell tool let model-issued commands run arbitrary code through allowlisted xargs and Python, even outside the project root (fixed 0.0.845)
In Code Graph RAG 0.0.844 and earlier, execute_shell_command (codebase_rag/tools/shell_command.py) checked only the base command, not the program launched by an allowlisted xargs, and its dangerous-pattern filter missed Python code that uses modules such as subprocess instead of importing os. Someone who can influence a model-issued command (for example via prompt injection in a codebase) can run code outside the project root as the process user: after human approval in default mode, or with no approval in --yolo mode. Fixed in 0.0.845.
What it is
The AI agent's execute_shell_command tool validates the first word of a command against an allowlist. xargs is allowlisted, but the program xargs launches was not checked.
The dangerous-pattern filter looked for things like importing os, so Python interpreter code using subprocess slipped through.
In default mode the user must approve the command (which may look harmless); in --yolo mode it runs without approval. The noninteractive shell wrapper does not allow xargs.
Affected: code-graph-rag 0.0.844 and earlier. NVD published the CVE on 30 November 2026.
How to check
- Run pip show code-graph-rag (or check your checkout's tag) and confirm 0.0.845 or later.
- Check whether you run it with --yolo.
How to fix
- Upgrade Code Graph RAG to 0.0.845 or later.
- Avoid --yolo on untrusted repositories and read shell commands carefully before approving them.
pip show code-graph-rag | grep -i '^version' Sources
- criticalCVE-2026-115555 and 28 more: IBM's Langflow bulletin fixes 29 flaws up to 1.13.0, including 9.9 code execution, MCP tool calls that run custom code without admin rights and an unauthenticated public-flow RCE, upgrade to 1.13.1
- criticalCVE-2026-76092 and CVE-2026-76099: Docker MCP Gateway served its MCP endpoints with no auth in container mode, and its dynamic tools could mount the Docker socket for root on the host (fixed 0.43.1)
- criticalCVE-2026-142487: Joinly's meeting-agent MCP server let any network client import and run subprocess.Popen through the joinly-settings header (fixed 0.5.4)
- criticalCVE-2026-76812 and more: CKAN MCP Server's unauthenticated HTTP mode let anyone bounce sparql_query to the cloud metadata service and read IAM credentials, plus a string of SSRF, injection and DoS fixes (upgrade to 0.4.147)