# 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

- **Severity:** HIGH 7.3
- **CVSS:** 7.3 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: Required; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **CWE:** CWE-78, CWE-863
- **Published:** 2026-11-30T18:38:13.612Z
- **Modified:** 2026-11-30T19:17:55.780Z

> **AI summary (AI-generated, claude-haiku-5-5):** An attacker who can influence a model-issued shell command can execute arbitrary code via xargs with a Python interpreter in Code Graph RAG, bypassing its shell allowlist and pattern filter.

## Who should check

- Anyone running vitali87 code-graph-rag \< 0.0.845

## Description

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.

## Affected and fixed versions

- vitali87 code-graph-rag: \< 0.0.845 (cvelist)

## Technologies

PyPI packages (AI-matched), Python (AI-matched)

## Mitigation

- Upgrade code-graph-rag to 0.0.845 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-137185. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-137185.md
Affected: vitali87 code-graph-rag < 0.0.845
Fixed in: vitali87 code-graph-rag 0.0.845

Steps:
1. Search this machine and project for vitali87 code-graph-rag: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-137185 being exploited?

There is no confirmed exploitation: CVE-2026-137185 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.

### How serious is CVE-2026-137185?

High: CVSS 7.3 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2026-137185?

vitali87 code-graph-rag \< 0.0.845.

### Is there a fix for CVE-2026-137185?

Yes. Fixed in vitali87 code-graph-rag 0.0.845. Upgrade code-graph-rag to 0.0.845 or later.

### How do I check if I'm affected by CVE-2026-137185?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/vitali87/code-graph-rag/security/advisories/GHSA-wvxg-744g-6pcg>
- patch: <https://github.com/vitali87/code-graph-rag/commit/033b64be855c0d2c0767d8dd225fe0129ebe05da>
- patch: <https://github.com/vitali87/code-graph-rag/commit/25c4c7ecfc8d030380ab11fbacd412db210193fc>
- other: <https://github.com/vitali87/code-graph-rag/releases/tag/v0.0.845>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-137185>

HTML: <https://flawdb.com/CVE-2026-137185> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-137185>
