CVE-2026-126641
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.
Weakness
- CWE-322: Key Exchange without Entity Authentication
CISA SSVC decision points
| Exploitation | none |
|---|---|
| Automatable | no |
| Technical impact | partial |
| Scored | 2026-11-13 |
Timeline
- 2026-11-12Published by the CNA10:47 UTC
- 2026-11-13CISA SSVC decision recorded1 day after publication
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| red_hat ansible_automation_platform_2 | ||
| redhat ansible_automation_platform | 2no fix listed | not listed |
References
- http://www.openwall.com/lists/oss-security/2026/11/12/6
- https://access.redhat.com/security/cve/CVE-2026-126641
- https://bugzilla.redhat.com/show_bug.cgi?id=2571719
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2026-126641'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2026-126641'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2026-126641'curl 'https://api.contrastcyber.com/cve_products/CVE-2026-126641'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).