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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
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
Lifecycle Timeline
2DescriptionCVE.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.
AnalysisAI
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.
Technical ContextAI
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.
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.
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
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
Code injection in RooCodeInc Roo-Code up to version 3.51.1 allows a remote low-privileged attacker to execute injected c
Code injection in RooCodeInc Roo-Code up to version 3.51.1 allows a remote, low-privileged attacker with passive user in
A security vulnerability in Roo Code (CVSS 5.9). Remediation should follow standard vulnerability management procedures.
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 that lives in users' editors. Rated high severity (CVSS 7.8), this vul
Roo Code is an AI-powered autonomous coding agent that lives in users' editors. Rated medium severity (CVSS 5.5), this v
Roo Code is an AI-powered autonomous coding agent that lives in users' editors. Rated high severity (CVSS 8.1), this vul
Same weakness CWE-184 – Incomplete List of Disallowed Inputs
View allSame technique Command Injection
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-46065
GHSA-5xxh-cfjg-qm65