Analysis and contextual insights are available on OpenCVE Cloud.
Vendor Workaround
Do not enable host_key_auto_add (ansible.netcommon libssh) or AutoAddPolicy (ansible-pylibssh). Keep host_key_checking enabled and pre-populate known_hosts with verified host keys so that a changed key causes the connection to fail closed.
Tracking
Sign in to view the affected projects.
No advisories yet.
Thu, 12 Nov 2026 11:00:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| Description | 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. | |
| Title | Ansible-pylibssh: accepts a changed ssh host key when host_key_auto_add is enabled | |
| First Time appeared |
Redhat
Redhat ansible Automation Platform |
|
| Weaknesses | CWE-322 | |
| CPEs | cpe:/a:redhat:ansible_automation_platform:2 | |
| Vendors & Products |
Redhat
Redhat ansible Automation Platform |
|
| References |
| |
| Metrics |
cvssV3_1
|
Status: PUBLISHED
Assigner: redhat
Published:
Updated: 2026-11-12T10:47:30.699Z
Reserved: 2026-11-11T10:46:47.354Z
Link: CVE-2026-126641
No data.
Status : Awaiting Analysis
Published: 2026-11-12T11:17:11.317
Modified: 2026-11-12T11:17:11.470
Link: CVE-2026-126641
No data.
OpenCVE Enrichment
No data.