Security Advisories (1)
CVE-2026-94140 (2026-10-21)

Rex versions through 1.16.1 for Perl accept an unknown SSH host key for remote rsync transfers because sync hardcodes StrictHostKeyChecking=no. Every remote branch of sync builds its ssh command with that option, for password authentication, for private-key authentication and for the fallback. The ssh options a caller sets through set_openssh_opt reach the OpenSSH transport but not this command, so there is no configuration that restores host key checking for the transfer. An attacker who can redirect the connection before the real host key is known presents their own and the transfer proceeds: under password authentication sync sends the connection password to that server, an upload writes the selected local files to it, and a download writes what it returns to the local destination.

NAME

Rex::Commands::Sysctl - Manipulate sysctl

DESCRIPTION

With this module you can set and get sysctl parameters.

Version <= 1.0: All these functions will not be reported.

All these functions are not idempotent.

SYNOPSIS

use Rex::Commands::Sysctl;

my $data = sysctl "net.ipv4.tcp_keepalive_time";
sysctl "net.ipv4.tcp_keepalive_time" => 1800;

EXPORTED FUNCTIONS

sysctl($key [, $val [, %options]])

This function will read the sysctl key $key.

If $val is given, then this function will set the sysctl key $key.

task "tune", "server01", sub {
  if( sysctl("net.ipv4.ip_forward") == 0 ) {
    sysctl "net.ipv4.ip_forward" => 1;
  }
};

If both $val and ensure option are used, the sysctl key is modified and the value may persist in /etc/sysctl.conf depending if ensure option is "present" or "absent".

With ensure => "present", if the key already exists in the file, it will be updated to the new value.

task "forwarding", "server01", sub {
  sysctl "net.ipv4.ip_forward" => 1, ensure => "present";
}