Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-94140 Overview
CVE-2026-94140 affects Rex versions through 1.16.1 for Perl. The Rex::Commands::Rsync module hardcodes StrictHostKeyChecking=no when building SSH commands for remote rsync transfers. This disables SSH host key verification [CWE-322] for every branch of the sync logic, including password authentication, private-key authentication, and the fallback path. Options supplied through set_openssh_opt reach the OpenSSH transport but not this rsync command, leaving no configuration path to restore host key checking for the transfer. An attacker positioned to redirect the SSH connection can present an attacker-controlled host key and intercept credentials or file content.
Critical Impact
Attackers who can redirect network traffic can capture SSH passwords, exfiltrate uploaded files, or inject attacker-controlled data into local destinations during rsync downloads.
Affected Products
- Rex Perl module versions through 1.16.1
- Rex::Commands::Rsync component
- Perl environments that automate remote file synchronization using Rex
Discovery Timeline
- 2026-10-21 - CVE-2026-94140 published to NVD
- 2026-10-22 - Last updated in NVD database
Technical Details for CVE-2026-94140
Vulnerability Analysis
Rex is a Perl framework for remote server automation. The Rex::Commands::Rsync module wraps the system rsync binary and constructs an SSH transport string for the -e option. In every code path that builds this transport, the module appends -o StrictHostKeyChecking=no, which instructs OpenSSH to accept any host key presented by the remote server without validation or user confirmation.
The module exposes set_openssh_opt for callers to pass additional SSH options. These options are honored by the general Rex OpenSSH transport but are not propagated into the rsync-specific SSH command string. As a result, there is no supported configuration that enables host key verification for rsync transfers, even when the surrounding Rex task enforces strict checking elsewhere.
Root Cause
The root cause is a hardcoded insecure default in the SSH command assembly logic of Rex::Commands::Rsync. The option StrictHostKeyChecking=no is embedded as a string literal in each remote branch of sync, bypassing the normal option plumbing that callers rely on to express security policy.
Attack Vector
An attacker who can intercept or redirect the SSH connection, through ARP spoofing, DNS poisoning, BGP hijacking, or a compromised network device, can present their own SSH host key. The rsync transfer proceeds without warning. Under password authentication, Rex sends the SSH password to the attacker-controlled endpoint. During an upload, the selected local files are written to the attacker's server. During a download, the attacker returns arbitrary content that is written to the local destination path, enabling targeted file tampering.
The vulnerability mechanism is documented in the MetaCPAN Rex module source and the Openwall OSS-Security advisory.
Stop Remote Code Execution Before It Runs
Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.
Stop Exploit AttemptsDetection Methods for CVE-2026-94140
Indicators of Compromise
- Rsync processes spawned by Rex with -o StrictHostKeyChecking=no in the SSH command line
- Unexpected entries or churn in ~/.ssh/known_hosts on hosts running Rex automation
- Rsync transfers to or from IP addresses that do not match the intended remote inventory
Detection Strategies
- Audit Rex playbooks and tasks that invoke Rex::Commands::Rsync to inventory exposed credentials and file paths
- Inspect process telemetry for ssh or rsync child processes carrying the StrictHostKeyChecking=no option
- Correlate network flow data with expected rsync destinations to flag redirected sessions
Monitoring Recommendations
- Alert on changes to known_hosts files on automation and CI/CD hosts that run Rex
- Monitor outbound SSH connections from automation hosts for destinations outside approved ranges
- Capture command-line arguments for Perl and rsync processes in endpoint telemetry for retrospective hunting
How to Mitigate CVE-2026-94140
Immediate Actions Required
- Pause Rex automation that performs rsync transfers over untrusted networks until a fix is applied
- Rotate any SSH passwords used by Rex tasks that may have traversed untrusted paths
- Prefer private-key authentication to eliminate password capture risk during the window of exposure
Patch Information
No fixed version is listed in the NVD entry at publication. Monitor the MetaCPAN Rex release page and the Openwall OSS-Security thread for a corrected release that removes the hardcoded StrictHostKeyChecking=no and respects set_openssh_opt values in the rsync command path.
Workarounds
- Run Rex rsync transfers only over trusted, segmented management networks until patched
- Pre-populate known_hosts on the Rex control host and validate entries out of band before any transfer
- Replace Rex::Commands::Rsync calls with direct rsync invocations that pass an explicit -e "ssh -o StrictHostKeyChecking=yes -o UserKnownHostsFile=/path/to/known_hosts" transport
- Enforce SSH certificate authentication with a trusted certificate authority to bind host identity cryptographically
# Example: invoke rsync directly with strict host key checking enforced
rsync -av -e "ssh -o StrictHostKeyChecking=yes \
-o UserKnownHostsFile=/etc/ssh/known_hosts.rex \
-i /etc/rex/id_ed25519" \
./payload/ deploy@target.example.internal:/srv/app/
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

