HighVulnerabilityLLM-specific
GHSA-456v-xq2p-r4cj: code-ollama: `grep_search` Command Injection via Unescaped `$()` Shell Substitution (CWE-78)
- Identifier
- GHSA-456v-xq2p-r4cj
- Published
- Record updated
- Affected
- code-ollama <= 0.36.0
- Fixed in
- 0.36.1
- released June 24, 2026, 96 days before disclosure
Summary
The `grep_search` tool in `code-ollama` builds a shell command by interpolating attacker-controlled `pattern` and `path` arguments and runs it through `child_process.exec()`. Its sanitization escapes only backslashes and double quotes, so `$()` and backtick substitution pass through, allowing arbitrary OS command execution with the privileges of the local user. Because `grep_search` is treated as read-only, it runs automatically in Plan mode without an approval prompt.
Mitigation
The source does not state a fix yet. Check the original advisory for updates.
Topics
Related items
- CriticalCVE-2026-118285: Azure Machine Learning server-side request forgery allows privilege elevationSimilar attack · NVD/CVE Database
- HighCVE-2026-130164: Hermes Agent code execution via screen environment file mergeSimilar attack · NVD/CVE Database
- MediumCVE-2026-135287: LiteLLM Proxy callback injection through request body callbacks fieldsSimilar attack · NVD/CVE Database
- MediumCVE-2026-135212: AiSOC missing authorization in agents service exposes other tenantsSimilar attack · NVD/CVE Database
- MediumAI Agents Zip From Flaw Discovery to Root Access in 11 MinutesSimilar attack · Dark Reading