CVE-2026-126641
Last modified
CVE-2026-126641 is a medium-severity vulnerability rated 6.5/10 on the CVSS scale. 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.
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.
Metrics
Weakness Enumeration
Affected Software
Source: CNA advisory (CVE.org). NVD analysis pending.
| Vendor | Product | Versions |
|---|---|---|
| Red Hat | Red Hat Ansible Automation Platform 2 | All versions |
References
Timeline
- Published
- Last Modified
- Status
- Awaiting Analysis
Frequently Asked Questions
What is CVE-2026-126641?
How severe is CVE-2026-126641?
How do I fix CVE-2026-126641?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-126624Unverified ownership in the Windows installer of Progressive…7.3
- CVE-2026-126625Incorrect default permissions in the Windows installer of Pr…6.7
- CVE-2026-126626The web services listener of Progressive Robot hMailServer 6…5.3
- CVE-2026-126627Creation of Temporary File With Insecure Permissions vulnera…
- CVE-2026-12663A security issue exists within ControlFLASH™, where the inst…7
- CVE-2026-12664GitLab has remediated an issue in GitLab CE/EE affecting all…6.8
- CVE-2026-126642An incorrect authorization flaw was found in AWX, the automa…6.5
- CVE-2026-126643A cleartext storage flaw was found in the AAP Gateway Operat…6.5
- CVE-2026-126644A link-following flaw was found in the authorized_key module…3.9
- CVE-2026-12665IBM MQ could allow a remote attacker to execute arbitrary co…9.8
- CVE-2026-126658ByteStash 1.5.10 before 1.6.2 contains an insufficient sessi…5.4
- CVE-2026-126659BlueprintUE Self-Hosted Edition 1.0.0 before 4.3.5 contains …7.5
Are you affected by CVE-2026-126641?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
