Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2025-65946

CVE-2025-65946: Roocode Roo Code RCE Vulnerability

CVE-2025-65946 is a remote code execution vulnerability in Roocode Roo Code that allows automatic execution of unauthorized commands. This article covers the technical details, affected versions, impact, and mitigation.

Published: April 15, 2026

CVE-2025-65946 Overview

CVE-2025-65946 is a command injection vulnerability in Roo Code, an AI-powered autonomous coding agent that operates within users' editors. Prior to version 3.26.7, a validation error in the command allow list implementation allowed the AI agent to automatically execute commands that did not match the configured allow list prefixes. This vulnerability enables potential attackers to bypass security controls designed to restrict command execution, potentially leading to unauthorized code execution within the development environment.

Critical Impact

Attackers can bypass command validation controls to execute arbitrary commands through the Roo Code AI agent, potentially compromising the integrity, confidentiality, and availability of the development environment.

Affected Products

  • Roo Code versions prior to 3.26.7
  • All installations using the vulnerable command validation module
  • Development environments with Roo Code AI agent enabled

Discovery Timeline

  • 2025-11-21 - CVE-2025-65946 published to NVD
  • 2025-12-04 - Last updated in NVD database

Technical Details for CVE-2025-65946

Vulnerability Analysis

This vulnerability stems from improper input validation (CWE-20) combined with command injection weaknesses (CWE-77) in the Roo Code command validation module. The allow list mechanism, designed to restrict which commands the AI agent can automatically execute, contained a validation error that failed to properly handle certain command patterns. This flaw allowed commands that should have been blocked by the allow list to be executed without user approval.

The vulnerability is particularly concerning in the context of an AI-powered coding agent, as it operates autonomously and executes commands based on user prompts. A malicious prompt or crafted input could potentially trigger command execution that bypasses the intended security controls, exposing the development environment to arbitrary command injection attacks.

Root Cause

The root cause lies in the command validation logic within the command-validation.ts module. Specifically, the validation failed to correctly handle zsh glob qualifiers, which are special syntax patterns used in the Z shell for file matching with code execution capabilities. The patterns *(e:...:) and similar zsh glob qualifiers can execute arbitrary code during pathname expansion, but these dangerous patterns were not being detected by the original validation logic.

Attack Vector

The attack vector is network-based and requires no privileges or user interaction. An attacker could craft malicious input that exploits the validation bypass to execute unauthorized commands. The attack complexity is high due to the specific conditions required to trigger the vulnerability, but successful exploitation could result in complete compromise of confidentiality, integrity, and availability within the affected development environment.

typescript
  * - ${!var} - Indirect variable references
  * - <<<$(...) or <<<`...` - Here-strings with command substitution
  * - =(...) - Zsh process substitution that executes commands
+ * - *(e:...:) or similar - Zsh glob qualifiers with code execution
  *
  * @param source - The command string to analyze
  * @returns true if dangerous substitution patterns are detected, false otherwise

Source: GitHub Commit b50104cc

Detection Methods for CVE-2025-65946

Indicators of Compromise

  • Unexpected command executions logged by Roo Code that do not match configured allow list patterns
  • Unusual shell commands containing zsh glob qualifier patterns such as *(e:...:) in execution logs
  • Process spawning from the editor or Roo Code extension that appears anomalous
  • Evidence of shell commands with process substitution or indirect variable references being executed

Detection Strategies

  • Monitor Roo Code extension logs for commands that bypass allow list validation
  • Implement endpoint detection rules to alert on unusual process execution chains originating from editor processes
  • Review command history for patterns containing zsh-specific syntax like glob qualifiers with execution flags
  • Deploy behavioral analysis to detect anomalous AI agent command execution patterns

Monitoring Recommendations

  • Enable verbose logging for the Roo Code extension to capture all command execution attempts
  • Configure SIEM rules to correlate editor process activity with unexpected shell command execution
  • Implement file integrity monitoring on development environment configuration files
  • Set up alerts for any command execution containing known dangerous shell patterns

How to Mitigate CVE-2025-65946

Immediate Actions Required

  • Upgrade Roo Code to version 3.26.7 or later immediately
  • Review command execution logs for any signs of exploitation prior to patching
  • Audit allow list configurations to ensure they reflect intended security policies
  • Consider temporarily disabling automatic command execution until the patch is applied

Patch Information

The vulnerability has been patched in Roo Code version 3.26.7. The fix addresses the validation error by properly detecting zsh glob qualifiers with code execution capabilities. Organizations should update to the patched version through their extension marketplace or package manager.

For technical details on the fix, refer to the GitHub Security Advisory and the Pull Request #7667.

Workarounds

  • Disable automatic command execution in Roo Code settings until the update can be applied
  • Restrict the allow list to only essential, explicitly defined commands rather than prefix-based patterns
  • Run the development environment in a sandboxed or containerized configuration to limit potential impact
  • Implement additional network segmentation to isolate development environments from sensitive systems
bash
# Verify Roo Code version to ensure patch is applied
# Check extension version in your editor's extension management interface
# Version should be 3.26.7 or higher

# If using VS Code, check via command palette:
# Extensions: Show Installed Extensions
# Search for "Roo Code" and verify version >= 3.26.7

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechRoocode

  • SeverityHIGH

  • CVSS Score8.1

  • EPSS Probability0.22%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-20

  • CWE-77
  • Technical References
  • GitHub Pull Request
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2025-58371: Roocode Roo Code RCE Vulnerability

  • CVE-2025-58372: Roocode Roo Code RCE Vulnerability

  • CVE-2025-53536: Roocode Roo Code RCE Vulnerability

  • CVE-2025-58370: Roocode Roo Code RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English