The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
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-2026-40502

CVE-2026-40502: OpenHarness Command Injection Vulnerability

CVE-2026-40502 is a command injection flaw in OpenHarness that allows remote users to execute administrative commands without authorization. This article covers the technical details, affected versions, and mitigation.

Published: April 17, 2026

CVE-2026-40502 Overview

OpenHarness prior to commit dd1d235 contains a command injection vulnerability that allows remote gateway users with chat access to invoke sensitive administrative commands by exploiting insufficient distinction between local-only and remote-safe commands in the gateway handler. Attackers can execute administrative commands such as /permissions full_auto through remote chat sessions to change permission modes of a running OpenHarness instance without operator authorization.

Critical Impact

Remote attackers with basic chat access can escalate privileges and modify system permissions without authorization, potentially compromising the entire OpenHarness instance.

Affected Products

  • OpenHarness versions prior to commit dd1d235
  • OpenHarness installations with gateway chat functionality enabled
  • Systems running OpenHarness with default remote command configurations

Discovery Timeline

  • April 16, 2026 - CVE-2026-40502 published to NVD
  • April 16, 2026 - Last updated in NVD database

Technical Details for CVE-2026-40502

Vulnerability Analysis

This vulnerability stems from CWE-862 (Missing Authorization), where the OpenHarness gateway handler fails to properly distinguish between commands that should only be available locally versus those safe for remote execution. The gateway component processes slash commands from remote chat sessions without verifying whether the requesting user has appropriate privileges to execute administrative functions.

The attack surface is network-accessible and requires only low-privilege authentication (basic chat access). The vulnerability enables attackers to bypass the intended authorization model entirely, allowing them to invoke powerful administrative commands like /permissions full_auto that should be restricted to local operators.

Root Cause

The root cause is the absence of an authorization mechanism to differentiate administrative slash commands from regular user commands in the gateway handler. The original implementation treated all incoming commands from remote channels identically, without maintaining an allowlist or requiring explicit operator approval for sensitive operations.

Attack Vector

Exploitation occurs through network-accessible chat interfaces. An attacker with valid chat access credentials can craft malicious slash commands targeting administrative functions. The gateway processes these commands without verifying the source channel's authorization level, enabling unauthorized permission changes and other administrative actions.

The attack flow involves:

  1. Establishing a remote chat session with the OpenHarness gateway
  2. Sending administrative slash commands (e.g., /permissions full_auto)
  3. The gateway executes these commands without proper authorization checks
  4. System permissions or configurations are modified without operator consent
python
# Security patch in ohmo/gateway/models.py - Adding authorization controls
# Source: https://github.com/HKUDS/OpenHarness/commit/dd1d235450dd987b20bff01b7bfb02fe8620a0af

    send_tool_hints: bool = True
    permission_mode: str = "default"
    sandbox_enabled: bool = False
+    allow_remote_admin_commands: bool = False
+    allowed_remote_admin_commands: list[str] = Field(default_factory=list)
    log_level: str = "INFO"
    channel_configs: dict[str, dict] = Field(default_factory=dict)

Detection Methods for CVE-2026-40502

Indicators of Compromise

  • Unexpected permission mode changes in OpenHarness logs (e.g., transitions to full_auto mode)
  • Administrative slash commands originating from remote gateway channels
  • Unusual patterns of /permissions, /plan, or other administrative commands in chat logs
  • Configuration changes occurring without corresponding local operator sessions

Detection Strategies

  • Monitor gateway logs for administrative slash commands from remote sources
  • Implement alerting on permission mode changes that lack corresponding local authentication events
  • Review channel activity logs for anomalous command patterns from untrusted or unexpected sources
  • Deploy network traffic analysis to identify administrative command injection attempts

Monitoring Recommendations

  • Enable verbose logging for the OpenHarness gateway handler to capture all incoming commands
  • Set up alerts for any permission-related configuration changes
  • Audit remote channel configurations and access patterns regularly
  • Implement baseline monitoring for normal administrative command usage to detect deviations

How to Mitigate CVE-2026-40502

Immediate Actions Required

  • Update OpenHarness to commit dd1d235 or later immediately
  • Review and disable remote administrative commands by setting allow_remote_admin_commands to False
  • Audit gateway logs for any unauthorized administrative command execution
  • Restrict gateway chat access to trusted users only until patching is complete

Patch Information

The vulnerability has been addressed in commit dd1d235450dd987b20bff01b7bfb02fe8620a0af. The fix introduces explicit configuration options to control remote administrative command execution:

  • New allow_remote_admin_commands boolean flag (defaults to False)
  • New allowed_remote_admin_commands allowlist for granular control
  • Configuration wizard prompts for secure setup of remote command permissions

For additional details, refer to GitHub Pull Request #127 and the VulnCheck Advisory.

Workarounds

  • Disable gateway functionality entirely if remote chat access is not required
  • Implement network-level access controls to restrict gateway endpoints to trusted IP ranges
  • Use firewall rules to block external access to OpenHarness gateway ports
  • Deploy application-layer proxy rules to filter administrative slash commands from remote sources
python
# Secure configuration example from the patch
# Source: https://github.com/HKUDS/OpenHarness/commit/dd1d235450dd987b20bff01b7bfb02fe8620a0af

    allow_remote_admin_commands = _confirm_prompt(
        "Allow explicitly listed administrative slash commands from remote channels?",
        default=existing.allow_remote_admin_commands,
    )
    default_allowlist = ", ".join(existing.allowed_remote_admin_commands)
    allowed_remote_admin_commands: list[str] = []
    if allow_remote_admin_commands:
        allowlist_raw = _text_prompt(
            "Allowed remote admin commands (comma-separated, e.g. permissions, plan)",
            default=default_allowlist,
        )
        allowed_remote_admin_commands = [
            item.strip().lstrip("/")
            for item in allowlist_raw.split(",")
            if item.strip()
        ]

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

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechOpenharness

  • SeverityHIGH

  • CVSS Score8.7

  • EPSS Probability0.19%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/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
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-862
  • Technical References
  • GitHub Commit Update

  • GitHub Pull Request #127

  • VulnCheck Advisory on OpenHarness
  • Related CVEs
  • CVE-2026-40516: OpenHarness SSRF Vulnerability

  • CVE-2026-40503: OpenHarness Path Traversal Vulnerability

  • CVE-2026-22682: OpenHarness Auth Bypass 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