Skip to content
RCE Write-up Intermediate

Exploiting CVE-2026–1731: A Critical Pre-Auth RCE in BeyondTrus

A Bash script in BeyondTrust RS and PRA evaluated the remoteVersion field from a WebSocket handshake as an arithmetic expression, allowing command substitution. An unauthenticated attacker could run arbitrary commands on the appliance, though output was not returned.

Lakshan Sameera Follow

Published on medium.com

In early 2026, a severe vulnerability rocked the cybersecurity world: CVE-2026–1731, affecting BeyondTrust’s Remote Support (RS) and Privileged Remote Access (PRA) products.

Lakshan Sameera, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The script used untrusted input in a Bash arithmetic comparison, which evaluates the input as an expression and allows command substitution.

Impact

Unauthenticated attackers could gain control of internet-facing appliances, leading to data theft, lateral movement, or malware deployment; the injection was blind, so output was not returned directly.

What the attacker needed

Network access to the WebSocket endpoint; no authentication required

The fix

BeyondTrust released patches on 2 February 2026; self-hosted admins should upgrade to the fixed versions and restrict internet exposure.

How it was found

  1. Connect to the WebSocket endpoint that handles the handshake.
  2. Send a remoteVersion value containing a command substitution.
  3. The server runs the injected command during the arithmetic comparison.
  4. Confirm execution through out-of-band channels because no output is returned.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A web endpoint passed a value from the client into a shell script that used it in a numeric comparison. The shell evaluated the value as code, so an attacker could make the server run their own commands without logging in. The result was not shown back, so attackers had to use other signals to confirm it worked.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by Lakshan Sameera

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.