Ad

CVE-2026-126641

MEDIUM CVSS 3.1: 6,5 EPSS 0.36%
Обновлено 13 ноября 2026
Ansible
Параметр Значение
CVSS 6,5 (MEDIUM)
Тип уязвимости CWE-322
Поставщик Ansible
Публичный эксплойт Нет

Ошибка проверки ключа хоста была обнаружена в ansible-pylibssh и в плагине подключения ansible.netcommon libssh. Когда trust-on-first-use включен (host_key_auto_add на плагине подключения libssh, или AutoAddPolicy в ansible-pylibssh), хост, который уже присутствует в known_hosts, но теперь представляет другой ключ, принимается без предупреждения. The pylibssh Session.verify_knownhost() method passes the SSH_KNOWN_HOSTS_CHANGED and SSH_KNOWN_HOSTS_OTHER states to the same missing_host_key() policy hook used for unknown hosts, and the bundled AutoAddPolicy/RejectPolicy classes (as well as ansible.netcommon's MyAddPolicy, which is modeled on paramiko's AutoAddPolicy) therefore add the changed key and continue the connection rather than aborting as paramiko's BadHostKeyException path would.

В результате контроллер аутентифицируется на заменяющем хосте, запускает там воспроизведение и добавляет новый ключ к known_hosts, который может раскрыть учетные данные подключения злоумышленнику, выполняющему атаку machine-in-the-middle. Конфигурации по умолчанию (host_key_checking включен, host_key_auto_add отключен) не затронуты; неинтерактивные запуски закрыты.

Показать оригинальное описание (EN)

A host key verification flaw was found in ansible-pylibssh and in the ansible.netcommon libssh connection plugin. When trust-on-first-use is enabled (host_key_auto_add on the libssh connection plugin, or AutoAddPolicy in ansible-pylibssh), a host that is already present in known_hosts but now presents a different key is accepted without warning. The pylibssh Session.verify_knownhost() method passes the SSH_KNOWN_HOSTS_CHANGED and SSH_KNOWN_HOSTS_OTHER states to the same missing_host_key() policy hook used for unknown hosts, and the bundled AutoAddPolicy/RejectPolicy classes (as well as ansible.netcommon's MyAddPolicy, which is modeled on paramiko's AutoAddPolicy) therefore add the changed key and continue the connection rather than aborting as paramiko's BadHostKeyException path would. As a result the controller authenticates to the substitute host, runs the play there, and appends the new key to known_hosts, which can disclose connection credentials to an attacker performing a machine-in-the-middle attack. Default configurations (host_key_checking enabled, host_key_auto_add unset) are not affected; non-interactive runs fail closed.

Характеристики атаки

Способ атаки
По сети
Атака возможна удалённо
Сложность
Высокая
Сложно эксплуатировать
Нужны права
Не требуются
Права не нужны
Участие пользователя
Не требуется
Не нужно действие пользователя

Последствия

Конфиденциальность
Высокое
Полная утечка данных
Целостность
Низкое
Частичная модификация данных
Доступность
Нет
Нет нарушения работы

Строка CVSS v3.1

Тип уязвимости (CWE)