CVE-2026-30307
Received Received - Intake
OS Command Injection in Roo Code Auto-Approval Enables RCE

Publication date: 2026-03-30

Last updated on: 2026-04-06

Assigner: MITRE

Description
Roo Code's command auto-approval module contains a critical OS command injection vulnerability that renders its whitelist security mechanism completely ineffective. The system relies on fragile regular expressions to parse command structures; while it attempts to intercept dangerous operations, it fails to account for standard Shell command substitution Roo Code (specifically$(...)and backticks ...). An attacker can construct a command such as git log --grep="$(malicious_command)", forcing Syntx to misidentify it as a safe git operation and automatically approve it. The underlying Shell prioritizes the execution of the malicious code injected within the arguments, resulting in Remote Code Execution without any user interaction.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-03-30
Last Modified
2026-04-06
Generated
2026-05-07
AI Q&A
2026-03-30
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
roocode roo_code to 3.46.1 (inc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-94 The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

CVE-2026-30307 is a critical OS command injection vulnerability in Roo Code's command auto-approval module. This module is supposed to whitelist safe commands using regular expressions, but it fails to properly handle shell command substitution syntax such as $(...) and backticks (`).

An attacker can craft commands like git log --grep="$(malicious_command)" which the system mistakenly approves as safe. However, the underlying shell executes the malicious command embedded within the argument, leading to remote code execution without any user interaction.


How can this vulnerability impact me? :

This vulnerability allows an attacker to execute arbitrary commands remotely on the affected system without any user interaction. Because the whitelist mechanism is bypassed, malicious commands can run with the privileges of the Roo Code process.

The impact includes potential full system compromise, unauthorized data access or modification, disruption of services, and the ability for attackers to install malware or pivot to other systems within the network.


How can this vulnerability be detected on my network or system? Can you suggest some commands?

Detection of this vulnerability involves monitoring for suspicious command patterns that exploit the command auto-approval module's failure to properly parse shell command substitutions such as $() and backticks.

You can look for commands that include git operations with arguments containing shell substitution syntax, for example: git log --grep="$(malicious_command)" or git log --grep=`malicious_command`.

To detect such attempts on your system, you might use commands that search logs or running processes for suspicious patterns. For example:

  • grep -rE '\$\(|`' /var/log/ or relevant log directories to find commands containing $() or backticks.
  • ps aux | grep -E '\$\(|`' to check running processes for command substitution patterns.
  • Audit command execution logs or Roo Code logs for commands that include shell substitution syntax in git commands.

What immediate steps should I take to mitigate this vulnerability?

Immediate mitigation steps include disabling or restricting the use of the command auto-approval module in Roo Code until a patch is available.

Avoid relying on the fragile regular expression-based whitelist mechanism that fails to properly neutralize shell command substitutions.

Implement stricter input validation and sanitization to prevent shell command injection, especially for commands that include user-supplied arguments.

Monitor and audit all commands automatically approved and executed by Roo Code for suspicious patterns involving shell command substitution.

Apply any available updates or patches from Orangecat Technologies addressing this vulnerability as soon as they are released.


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

The vulnerability in Roo Code's command auto-approval module allows remote code execution due to improper neutralization of special shell elements, which can lead to unauthorized execution of malicious commands.

Such a critical security flaw can compromise the confidentiality, integrity, and availability of systems and data, potentially leading to breaches of sensitive information.

As a result, organizations using Roo Code with this vulnerability may face challenges in maintaining compliance with common standards and regulations like GDPR and HIPAA, which require adequate security controls to protect personal and sensitive data.

Failure to address this vulnerability could lead to unauthorized data access or manipulation, thereby violating regulatory requirements for data protection and incident response.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart