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::CMDB - Function to access the CMDB (configuration management database)

DESCRIPTION

This module exports a function to access a CMDB via a common interface. When the 0.51 feature flag or later is used, the CMDB is enabled by default with Rex::CMDB::YAML as the default provider.

SYNOPSIS

use Rex::CMDB;

set cmdb => {
  type           => 'YAML',
  path           => [ 'cmdb/{hostname}.yml', 'cmdb/default.yml', ],
  merge_behavior => 'LEFT_PRECEDENT',
};

task 'prepare', 'server1', sub {
  my %all_information          = get cmdb;
  my $specific_item            = get cmdb('item');
  my $specific_item_for_server = get cmdb( 'item', 'server' );
};

EXPORTED FUNCTIONS

set cmdb

set cmdb => {
  type => 'YAML',
  %provider_options,
};

Instantiate a specific type of CMDB provider with the given options. Returns the provider instance.

Please consult the documentation of the given provider for their supported options.

cmdb([$item, $server])

Function to query a CMDB.

If called without arguments, it returns the full CMDB data structure for the current connection.

If only a defined $item is passed, it returns only the value for the given CMDB item, for the current connection.

If only a defined $server is passed, it returns the whole CMDB data structure for the given server.

If both $item and $server are defined, it returns the given CMDB item for the given server.

The value returned is a Rex::Value, so you may need to use the get cmdb(...) form if you'd like to assign the result to a Perl variable:

task 'prepare', 'server1', sub {
  my %all_information          = get cmdb;
  my $specific_item            = get cmdb('item');
  my $specific_item_for_server = get cmdb( 'item', 'server' );
};

If caching is enabled, this function caches the full data structure for the given server under the cmdb/$CMDB_PROVIDER/$server cache key after the first query.