← All advisories

CVE-2026-137185highCode execution2026-11-30

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.

01.

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.

02.

How to check

  1. Run pip show code-graph-rag (or check your checkout's tag) and confirm 0.0.845 or later.
  2. Check whether you run it with --yolo.
03.

How to fix

  1. Upgrade Code Graph RAG to 0.0.845 or later.
  2. Avoid --yolo on untrusted repositories and read shell commands carefully before approving them.
pip show code-graph-rag | grep -i '^version'
04.

Sources

Related on VibeVulns
More advisories for this tool
The weekly email

One email a week. Only what changed.

Every new security hole in AI coding tools, MCP servers, app builders and the stacks they generate (Next.js, Supabase, Node, PHP), each with how to check your app and the fix. No roundups of things you already read.

Free, one email a week. Read the latest issue first if you like. One-click unsubscribe in every email. We never sell or share addresses.