Read the docs

Code Graph RAG shell command filter bypass allows code execution

Priority MEDIUM 47CWE-78Published · Updated

Key facts

Attack vector
Local
Privileges required
Low
User interaction
Required
Attack complexity
Low
Impact type
Code execution, Security bypass
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA. Impact type from CWE-78 and CWE-863.

Summary

Code Graph RAG from vitali87 before 0.0.845 is affected. Its shell command check validates only the base command, so an allowlisted xargs can launch a Python interpreter whose code the dangerous-pattern filter misses (CWE-78). An attacker who influences a model-issued command can run code outside the project root as the process user, after human approval in default mode or without approval in --yolo mode.

Written with Claude Haiku 5.5 from the sources below · 2026-11-30

Description from the CNA

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, execute_shell_command in codebase_rag/tools/shell_command.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.

Why it matters now

Fix Fixed code-graph-rag (vitali87): 0.0.845

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
vitali87code-graph-ragbefore 0.0.8450.0.845Patch availableCNA
  • code-graph-rag Vendorvitali87 Affected before 0.0.845 Fixed in 0.0.845 Patch available CNA

Remediation

Upgrade code-graph-rag from vitali87 to 0.0.845, the fixed version.

Written with Claude Haiku 5.5 from the sources below · 2026-11-30

  • Fix · CNA code-graph-rag (vitali87) Fixed in 0.0.845

Timeline

  1. 2026-11-30 Threatist record created from CVE-2026-137185

References

  • TI-2026-85643 Path traversal in Code Graph RAG lets attackers read arbitrary files CVSS 3.1HIGH 7.5
  • TI-2026-85644 Code Graph RAG structural tools follow symlinks outside project root CVSS 3.1HIGH 7.1

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences