Bug 2572306 - CVE-2026-126641 python-ansible-pylibssh: accepts a changed SSH host key when host_key_auto_add is enabled [epel-all]
Summary: CVE-2026-126641 python-ansible-pylibssh: accepts a changed SSH host key when ...
Keywords:
Status: NEW
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: python-ansible-pylibssh
Version: epel10
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Orion Poplawski
QA Contact:
URL:
Whiteboard: {"flaws": ["dc50855d-31bc-4106-904d-d...
Depends On:
Blocks: CVE-2026-126641
TreeView+ depends on / blocked
 
Reported: 2026-11-12 09:30 UTC by Borja Tarraso
Modified: 2026-11-12 09:30 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Borja Tarraso 2026-11-12 09:30:33 UTC
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.

When trust-on-first-use is enabled (host_key_auto_add on the libssh plugin, or AutoAddPolicy in pylibssh), a host that is already in known_hosts but now presents a different key is accepted without warning: the controller authenticates to it, runs the play there, and appends the new key to known_hosts. Defaults are not affected - with host_key_checking on and host_key_auto_add unset, non-interactive runs fail closed. Root cause: pylibssh Session.verify_knownhost() passes SSH_KNOWN_HOSTS_CHANGED and SSH_KNOWN_HOSTS_OTHER to the same missing_host_key() policy hook used for unknown hosts. The hook name and the bundled AutoAddPolicy/RejectPolicy classes follow paramiko, where that hook is consulted only for absent hosts and a mismatched key raises BadHostKeyException. ansible.netcommon's MyAddPolicy, documented as "Based on AutoAddPolicy in paramiko", therefore adds changed keys as well. libssh's own tutorial stops the connection on both states. Verified on ansible-pylibssh 1.4.0 / libssh 0.12.0; ansible-core 2.21.5, ansible.netcommon 8.7.1 (ansible 14.5.0); ansible.netcommon.libssh and network_cli with ssh_type=libssh. Reporter: Satriyo Utomo (aleens-labs).


Note You need to log in before you can comment on or make changes to this bug.