Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessPlant nested-substitution payload in agent-visible content
-
DeliveryVictim's Roo Code proposes allowlisted-prefix command
-
ExploitParser masks parameter expansion, guard misses payload
-
ExecutionAuto-approve clears outer command
-
Persistexeca runs hidden substitution
-
ImpactArbitrary code execution on developer host
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation completeness
|
| Exploitation Conditions | Exploitation requires the target to be running Roo Code at or below 3.54.0 with the auto-approve execute feature enabled and at least one allowlisted command prefix configured; the payload must nest a command substitution ($(...) or backticks) inside a shell parameter-expansion default (e.g. ${x:-$(...)}) so the outer prefix matches the allowlist while containsDangerousSubstitution misses the inner substitution. Limiting factors: the victim must have auto-approve enabled (a non-default, opt-in convenience mode) with a permissive allowlist, and per CVSS UI:P the malicious command must be delivered into the agent's execution flow through content the user causes the AI to act on rather than triggered directly by the attacker; without auto-approve enabled the command surfaces for manual review and the bypass has no effect. |
| Impact | The vendor CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H, score 7.7) captures a network-reachable path to full confidentiality/integrity/availability compromise but tempers it with AT:P (a specific attack requirement) and UI:P (passive user interaction), meaning exploitation is not turnkey. The real gating condition is that the victim must have the auto-approve execute feature enabled with allowlisted command prefixes, and the malicious command must reach the agent's execution path, typically via attacker-influenced content the AI acts on. A public PoC and write-up exist, which raises practical risk, but the CVE is not in CISA KEV and no EPSS score was provided, so there is no evidence of widespread automated exploitation, suggesting a credible, demonstrated technique rather than a mass-exploited bug. The AV:N designation reflects that malicious input can arrive remotely, yet code execution still lands on the local developer machine and depends on user-side configuration, so a blanket 'unauthenticated internet RCE' framing would overstate it. |
| Exploit ScenarioDerived | A developer runs Roo Code with auto-approve execute enabled and a benign prefix such as 'echo' allowlisted, then directs it to work on an attacker-influenced repository, issue, or prompt. The agent is steered to emit an allowlisted-prefix command carrying a nested command substitution inside a parameter-expansion default; the guard approves the harmless-looking outer command while the shell expands and runs the hidden payload, yielding arbitrary code execution on the developer's machine. A public PoC demonstrating the parameter-expansion bypass is available. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 20, 2026
Arbitrary command execution in Roo Code (the open-source AI coding agent) through version 3.54.0 lets attackers slip past the auto-approve execute feature's allowlist/denylist by hiding command substitutions inside shell parameter-expansion defaults. Because the parser replaces parameter expansions with opaque placeholders before scanning for dangerous substitutions, a payload built from an allowlisted prefix carrying a nested $(...) is judged safe, auto-approved on the outer command, and executed by the shell via execa. A public PoC and technical write-up exist (reported by VulnCheck); there is no confirmed active exploitation (not in CISA KEV) and no EPSS score was provided.
RemediationAI
Upgrade to a Roo Code release later than 3.54.0 that corrects the parse-command.ts placeholder ordering; however, the available data does not name a confirmed fixed version, so verify the patched release directly against the VulnCheck advisory (https://www.vulncheck.com/advisories/roo-code-command-injection-via-parameter-expansion-parsing) before relying on an upgrade - upstream fix status is not independently confirmed from the provided data. As immediate compensating controls, disable the auto-approve execute feature so every proposed command requires explicit human review (trade-off: loses the automation convenience the feature provides), or empty/severely tighten the command allowlist so no prefix is auto-approved (trade-off: more approval prompts and slower workflows). Additionally, run Roo Code only against trusted repositories and prompts to reduce the chance of attacker-controlled content reaching the executor, and use the write-up at https://github.com/geo-chen/oss/blob/main/Roo-Code.md to build detection for nested command-substitution patterns.
Affected VersionsENISA
Affected Packages
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
Roo Code is a VS Code AI coding-assistant extension that can propose and run shell commands, gated by a user-configurable allowlist/denylist in its auto-approve execute feature. The flaw lives in parse-command.ts: to normalize a command line it first substitutes shell parameter expansions (e.g. ${VAR:-default}) with opaque placeholders, then separately extracts command substitutions ($(...) and backticks) for its containsDangerousSubstitution guard. Because the placeholder step runs first, any command substitution nested inside a parameter-expansion default is masked and never seen by the guard, so only the benign outer command prefix is evaluated for approval. This is a textbook CWE-184 (Incomplete List of Disallowed Inputs / incomplete denylist): the safety check operates on a sanitized representation that no longer reflects what the shell, via execa, will ultimately expand and execute.
Know when Roo Code 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
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
AC:H and UI:R because exploitation needs auto-approve enabled with an allowlist plus user-driven agent action; PR:N as no victim-system authentication is required, with full local C/I/A impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
Roo Code through 3.54.0 contains a command injection vulnerability in the auto-approve execute feature that allows attackers to bypass allowlist/denylist enforcement by nesting command substitutions inside parameter expansion defaults. The command parser in parse-command.ts replaces parameter expansions with opaque placeholders before extracting command substitutions, causing the containsDangerousSubstitution guard to miss nested payloads, which are then auto-approved based on the outer allowlisted command prefix and executed by the shell via execa, enabling arbitrary command execution.
Executive ViewAI
Roo Code AI coding agent through version 3.54.0 is vulnerable to command execution attacks that bypass built-in safety mechanisms, potentially compromising code integrity and system security across development and deployment pipelines. Organizations deploying this tool face risk to developer workstations and automated CI/CD systems. A working exploit is publicly available with no vendor patch currently available.
Disable the auto-approve execute feature and require manual approval for all command execution; restrict Roo Code deployment to isolated or sandboxed environments with minimal outbound network access; implement comprehensive logging and monitoring of all command execution attempts; enforce mandatory code review processes for all Roo Code-generated output; consider restricting usage to offline or air-gapped development environments until a patch is available.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
Roo Code is an AI-powered autonomous coding agent that lives in users' editors. Rated critical severity (CVSS 9.9), this
Roo Code is an AI-powered autonomous coding agent that lives in users' editors. Rated high severity (CVSS 8.1), this vul
Roo Code is an AI-powered autonomous coding agent. Prior to 3.22.6, if the victim had "Write" auto-approved, an attacker
Roo Code is an AI-powered autonomous coding agent. The project-specific MCP configuration for the Roo Code agent is stor
Command approval bypass in Roo Code through 3.54.0 allows unauthenticated remote attackers to execute shell commands tha
Command-approval bypass in Roo Code through 3.54.0 lets attacker-influenced input cause the agent to execute arbitrary s
Auto-approval command filtering in Roo Code through 3.54.0 can be bypassed, letting an attacker run commands that should
Command approval bypass in Roo Code through 3.54.0 lets an attacker get denied shell commands auto-approved and executed
Roo Code through 3.54.0 can execute shell commands that its command auto-approval allowlist is meant to deny, because ge
Cleartext transmission of OAuth credentials in RooCodeInc Roo-Code up to version 3.51.1 exposes sensitive OAuth tokens t
Path traversal in RooCodeInc Roo-Code through version 3.51.1 allows remote unauthenticated attackers to read and write f
Code injection in RooCodeInc Roo-Code through version 3.51.1 allows remote attackers to execute arbitrary code via the E
EUVD-2026-46065
GHSA-5xxh-cfjg-qm65
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB