Code Graph RAG shell command filter bypass allows code execution
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
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
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
- 2026-11-30 Threatist record created from CVE-2026-137185
References
Other 4
- https://github.com/vitali87/code-graph-rag/security/advisories/GHSA-wvxg-744g-6pcg
- https://github.com/vitali87/code-graph-rag/commit/033b64be855c0d2c0767d8dd225fe0129ebe05da
- https://github.com/vitali87/code-graph-rag/commit/25c4c7ecfc8d030380ab11fbacd412db210193fc
- https://github.com/vitali87/code-graph-rag/releases/tag/v0.0.845
More vitali87 vulnerabilities
- 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