HOL-VULN-2026-0015HOL vulnerability recordCVSS 4.0 8.2 · HighPublic

EXECUTE_SHELL allowlist and dangerous-pattern blacklist both miss xargs interpreter -c in vitali87/code-graph-rag

The execute_shell_command tool in vitali87/code-graph-rag restricts model-issued shell commands through a base-command allowlist and a regex blacklist for dangerous constructs. xargs is on the allowlist. Neither layer stops xargs from launching an arbitrary interpreter such as python3, perl, ruby or node that is not itself on the allowlist, and the one blacklist rule meant to catch this case only fires when the Python one-liner imports the os module by name. Using subprocess, pty or ctypes instead slips past every check. The result is unconfined code execution as the code-graph-rag process user, not sandboxed to the project root and not limited to the allowlisted command set. In default mode the command needs one human approval click on an invocation that reads as ordinary batch processing; in --yolo mode it needs no human step at all. Triage of the fix found two further bypasses of the same class in shipped code: git --git-dir, -C and --work-tree options that make git execute config from a caller-writable directory, and git --exec-path, which relocates the directory git resolves subcommands in. The advisory records code-graph-rag at or below 0.0.844 as affected and 0.0.845 as patched. CVE-2026-137185 is assigned to GHSA-wvxg-744g-6pcg.

Affected artifact
vitali87/code-graph-rag — execute_shell_command tool (codebase_rag/tools/shell_command.py, codebase_rag/config.py SHELL_COMMAND_ALLOWLIST)mcp server
Affected versions
code-graph-rag ≥ 0 to < 0.0.845
Fixed in
0.0.845
Last verified
2026-12-03

Severity

CVSS 4.0 score 8.2 (High), scored by HOL.

CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

What this means

GHSA-wvxg-744g-6pcg / CVE-2026-137185: in code-graph-rag, xargs on the shell allowlist could launch any interpreter with -c, bypassing both the allowlist and the dangerous-pattern blacklist, for unconfined code execution. Fixed in 0.0.845; upgrade from 0.0.844 and below.

What to do

Upgrade code-graph-rag to 0.0.845 or later. Operators of similar tools should validate the command a launcher such as xargs will invoke against the same allowlist, and deny interpreter one-liners reached through an allowlisted launcher.

Evidence

Precondition. A model call to execute_shell_command, steered by a mistaken model decision or by prompt injection from analysed repository or web content, presenting an xargs interpreter command; in default mode a human approves it once, in --yolo mode no approval is needed.

Source proof. Per the advisory, _validate_segment accepted xargs python3 -c importing subprocess, and ShellCommander.execute ran it end to end, returning the invoking user's id output. HOL did not run the tool; this rests on the advisory.

Version determination. Determined by range — The advisory states code-graph-rag at or below 0.0.844 is affected, patched in 0.0.845.

Disclosure

Disclosure state: independent public · Publisher: vitali87/code-graph-rag

Naming decision: named. Vendor named as drafted. Finding already public under GHSA-wvxg-744g-6pcg with fix in 0.0.845; naming call sits with this job under Nov 24-25 2026 rules.

Vendor response: fixed — Fix published in 0.0.845.

  1. 2026-09-02 · vendor action

    Maintainers published advisory GHSA-wvxg-744g-6pcg with the fix in 0.0.845.

  2. 2026-12-03 · guard update

    Status moved from draft to triaged: Transition to triaged: record is in scope, sources are primary, finding already public and fixed upstream in 0.0.845.

  3. 2026-12-03 · guard update

    Status moved from triaged to evidence_verified: Transition to evidence_verified: record is in scope, sources are primary, finding already public and fixed upstream in 0.0.845.

  4. 2026-12-03 · disclosure

    Status moved from evidence_verified to public: Transition to public: record is in scope, sources are primary, finding already public and fixed upstream in 0.0.845.

Affected artifact references

Cite this record

[HOL-VULN-2026-0015] EXECUTE_SHELL allowlist and dangerous-pattern blacklist both miss xargs interpreter -c in vitali87/code-graph-rag — HOL Agent Vulnerability Ledger, HOL (hol.org), 2026. https://hol.org/guard/security/vulnerabilities/hol-vuln-2026-0015

Canonical URL: https://hol.org/guard/security/vulnerabilities/hol-vuln-2026-0015

Found an error in this record, or want to appeal it? Report an issue or appeal.

Appeal or correct this record

Maintainers and affected parties can submit evidence, dispute the record, or request a correction through the disclosure page. A dispute marks the record visibly disputed — it never silently disappears.

Appeal or correct HOL-VULN-2026-0015