Skip to main content

Code Graph RAG CVE-2026-137185

| EUVDEUVD-2026-139635 HIGH
OS Command Injection (CWE-78)
2026-11-30 security-advisories@github.com
7.3
CVSS 3.1 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Inject command via prompt injection in indexed content
  2. Delivery
    Craft xargs python3 -c subprocess payload
  3. Exploit
    Bypass allowlist and dangerous-pattern filter
  4. Execution
    Human approves (or --yolo skips approval)
  5. Impact
    Execute arbitrary code as process user outside project root

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK

2 techniques across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the allowlisted xargs command to launch an interpreter that is NOT itself on the allowlist (python3, python, perl, ruby, or node), running inline code via -c/-e that performs its action through a module other than the literal token 'os' - subprocess, pty, or ctypes - so it evades the single python.*-c.*(import os|__import__('os')) blacklist rule. The attacker must be able to influence a model-issued shell command (e.g. via prompt injection from analyzed repository or web content). Limiting factors: the vector is local (AV:L) via the agent's own tool, not remote network; in default mode a human must click approve once (UI:R) on a command that reads as a benign batch job, whereas --yolo mode (is_yolo) skips approval entirely and runs it the instant the model emits it; and the noninteractive shell wrapper is NOT affected because xargs is absent from its read-only command set. The only complete fix is updating to 0.0.845.

Impact

The CVSS 3.1 vector (AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H, base 7.3) frames this as a locally-vectored, low-privilege flaw requiring user interaction, with full confidentiality, integrity and availability impact - accurate for a sandbox-escape in a tool whose entire purpose is to confine model-issued commands. The vuln.today decision label is 'this_week' (priority, not emergency). This is NOT in CISA KEV and no EPSS score was supplied, so there is no evidence of widespread automated exploitation; however the GHSA-wvxg-744g-6pcg advisory contains a demonstrated proof-of-concept that ran id through a fully allowlist- and blacklist-validated segment, so exploitability is proven even though in-the-wild use is not. The signals are internally consistent rather than conflicting: a genuinely high technical impact (unconfined RCE as the process user) gated behind real preconditions (local vector, attacker must influence a model-issued command, and one human approval click in default mode). The practical priority is moderated by two things not captured in the raw score - the affected product is a niche AI tool with a small deployment footprint, and default mode still interposes human approval - so this is a credible 'patch this week' issue rather than a drop-everything emergency. Missing data to note explicitly: no EPSS value and no KEV entry were provided, so the probability and active-exploitation signals are absent rather than low.

Exploit ScenarioDerived

An attacker plants instructions in repository or web content that the Code Graph RAG agent indexes, coaxing the orchestrator model (prompt injection) into issuing a shell command shaped like echo x | xargs python3 -c "import subprocess;subprocess.call([...])", which reads as an ordinary batch-processing invocation. The command passes both the base-command allowlist (xargs is allowed) and the dangerous-pattern blacklist (the Python one-liner uses subprocess rather than the literal token 'os'), so in default mode a human clicks approve once, or in --yolo mode it runs unattended. A working proof-of-concept demonstrating this against the real ShellCommander is published in the GHSA advisory; it executed id and returned the invoking user's identity, confirming unconfined code execution outside the project root.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 30, 2026

Unconfined command execution in Code Graph RAG 0.0.844 and earlier lets a model-issued shell command escape the execute_shell_command validator by routing through the allowlisted xargs launcher into an interpreter (python3, perl, ruby, node) that the allowlist never vets. The only blacklist rule aimed at this case fires exclusively on the literal import os token, so a -c one-liner that reaches subprocess, pty or ctypes passes both layers and runs as the code-graph-rag process user with no project-root confinement. In default mode a human must approve one click on a command that reads as an ordinary batch job, while --yolo mode executes it unattended the moment the model emits it; the noninteractive shell wrapper is unaffected because xargs is absent from its read-only command set. The maintainers shipped a fix in 0.0.845, the advisory carries a working proof-of-concept reproduction, and no public exploit code or in-the-wild exploitation has been confirmed (not in CISA KEV); vuln.today priority is this_week.

RemediationAI

Vendor-released patch: 0.0.845 - upgrade the code-graph-rag package to 0.0.845 or later (pip install -U code-graph-rag), which is the only complete fix per the advisory; the remediation is documented at https://github.com/vitali87/code-graph-rag/security/advisories/GHSA-wvxg-744g-6pcg and the release at https://github.com/vitali87/code-graph-rag/releases/tag/v0.0.845, with the accompanying changes in commits 033b64be855c0d2c0767d8dd225fe0129ebe05da and 25c4c7ecfc8d030380ab11fbacd412db210193fc. Until upgrading, the highest-leverage compensating control is to stop running the agent in --yolo mode, because that path removes the single human approval click that is the only remaining gate in default mode; the trade-off is that every model-issued shell command then requires manual review, and reviewers must treat launcher commands (xargs/awk/sed) followed by any interpreter as suspicious rather than as ordinary batch processing. A second control, per the advisory's own suggested fix, is to remove xargs, awk and sed from SHELL_COMMAND_ALLOWLIST in codebase_rag/config.py (or deny interpreter one-liners reached through those launchers) so the first-token check can no longer be bypassed; the trade-off is loss of legitimate batch-processing and text-processing functionality for the agent. The noninteractive wrapper already rejects these segments and does not need changing. Note that blocking individual module names or adding more blacklist regexes is not an effective mitigation, since perl/ruby/node one-liners and python -c using subprocess, pty or ctypes are equally unmatched.

Affected VersionsENISA

code-graph-rag < 0.0.845

Affected Packages

euvd code_graph_rag fix: 0.0.845

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The affected component is a Python tool layer, codebase_rag/tools/shell_command.py, which attempts to confine model-issued shell commands with two independent layers: a base-command allowlist (SHELL_COMMAND_ALLOWLIST, which contains xargs, awk and sed but not python3/python/perl/ruby/node) and a regex veto list (SHELL_DANGEROUS_PATTERNS_SEGMENT) applied even to allowlisted commands. _validate_segment only inspects cmd_parts[0], the segment's own base command; the program that xargs is told to spawn is never checked against the allowlist because it is not the first token of any parsed segment. The surviving blacklist entries are shape-specific: python.*-c.*(import os|__import__('os')) requires the literal os-import spelling, and the xargs rules cover only rm/chmod/chown/mv/dd/mkfs, xargs -I ... sh and xargs ... bash. An interpreter one-liner that performs its work via subprocess, pty or ctypes therefore matches nothing. Once validation passes, ShellCommander.execute launches the segment with asyncio.create_subprocess_exec(..., cwd=project_root, ...) with no seccomp, container or path confinement - and because the payload is interpreter code rather than a filesystem operation, the validate_project_path confinement used by the other tools is irrelevant. This is CWE-78 (OS command injection) compounded by CWE-863 (incorrect authorization), since the authorization model treats a general-purpose program launcher as if it were a leaf utility. The advisory explicitly identifies this as a third instance of the same class after GHSA-4p93-4vf7-4m8r (find -exec) and GHSA-2rr7-8xrw-gmhr (git config), and the upstream fix generalizes the validator: the commit diff adds explicit handling for launcher nesting depth caps (SHELL_MAX_LAUNCHER_NESTING), program-naming flag suffixes, git global/optional-argument flags, ripgrep --pre/--hostname-bin and awk program-file and value flags, plus config-key suffix backstops. Authentication requirements are not confirmed from available data beyond the CVSS vector, which specifies PR:L; the trigger requires the ability to influence a model-issued command, typically via prompt injection from analyzed repository or web content.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (github) PRIMARY 7.3 HIGH
AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
vuln.today AI 7.3 HIGH

Local agent-tool vector (AV:L), no special timing (AC:L), attacker needs to drive a model-issued command and default mode needs a human approval click (PR:L/UI:R); interpreter runs unconfined giving full C:H/I:H/A:H.

3.1 AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Patch available
Nov 30, 2026 - 20:05 EUVD
CVE Published
Nov 30, 2026 - 19:17 cve.org
HIGH 7.3

DescriptionCVE.org

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.

Technical POC Analysis

CWE-78 (OS command injection; the advisory also tags CWE-863) in the model-facing executeshellcommand tool of code-graph-rag.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

A high-severity command execution flaw in Code Graph RAG (versions 0.0.844 and earlier) allows a model-generated shell command to bypass the product's command validator and run arbitrary code as the tool's process user, outside any project-root confinement. Teams running this tooling-especially in unattended --yolo mode-could face unauthorized code execution on developer and analysis systems, which leadership should treat as a potential path to data exposure and lateral movement rather than a mere developer inconvenience.

Business Impact: High
Compensating Controls

Vendor-released patch: 0.0.845. Until deployed, disable --yolo unattended mode, require and scrutinize human approval for any command invoking xargs with interpreter launchers, and run the tool under a least-privilege account isolated from sensitive repositories and credentials.

Threat Intelligence Overview

EPSS Score
0.2%
Top 85% exploitable
Prevalence
Low
niche open-source AI code-analysis tool, small PyPI footprint
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

36
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

OS command injection occurs when an application passes unsanitized user input directly into system shell commands.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy