Skip to content
Connect AISign inSign up free
CVE-2026-1266416.5MediumCWE-322

CVE-2026-126641: Ansible-pylibssh: accepts a changed ssh host key when host_key_auto_add is enabled

Red Hat · Red Hat Ansible Automation Platform 2

Affected: Red Hat Ansible Automation Platform 2 · Exploitation: unlikely (under 1%)

Not in CyberSIXT coverage yet: no article names this CVE. This page shows the public record.

0.3%probability of exploitation in the next 30 days
26th percentile
050100

Higher than 26% of scored CVEs

6.5MediumCVSS 3.1
LowMedium

DescriptionCVE.org

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.

Affected products6

From the CVE record. A product or version that is not listed is unknown, not unaffected.

  • Red Hat · Red Hat Ansible Automation Platform 2Versions not stated
  • Red Hat · Red Hat Ansible Automation Platform 2Versions not stated
  • Red Hat · Red Hat Ansible Automation Platform 2Versions not stated
  • Red Hat · Red Hat Ansible Automation Platform 2Versions not stated
  • Red Hat · Red Hat Ansible Automation Platform 2Versions not stated
  • Red Hat · Red Hat Ansible Automation Platform 2Versions not stated

On the Atlas

Every published CVE is on the CyberSIXT Atlas, grouped by weakness, vendor and month.

Open the Atlas
Exploitation
Unlikely (under 1%). EPSS under 1%, or no score yet.
CISA KEV
Not listed
Public check
No public nuclei template
Vendor
Red Hat
Published
November 2026

CoverageNo articles yet

No CyberSIXT article names CVE-2026-126641 yet, so there is no coverage timeline, action brief or change log for it. Everything on this page comes from the public CVE record, CISA KEV, EPSS and the nuclei template index. Search the archive or see the CVEs in the news.

References