Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain machine-in-the-middle position on SSH path
-
DeliveryImpersonate managed host with changed key
-
ExploitAutoAddPolicy/MyAddPolicy accepts changed key silently
-
ExecutionController authenticates to substitute host
-
ImpactConnection credentials disclosed and play executed on rogue host
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A04:2025 - Cryptographic Failures
ASVS 5.0
V11 - Cryptography Authenticated key exchange
|
| Exploitation Conditions | Requires trust-on-first-use to be explicitly enabled: host_key_auto_add set on the ansible.netcommon libssh connection plugin, or AutoAddPolicy used in ansible-pylibssh. The targeted host must already be present in known_hosts and must now present a different key (the SSH_KNOWN_HOSTS_CHANGED/SSH_KNOWN_HOSTS_OTHER states), and the attacker must hold an active machine-in-the-middle position on the SSH connection. Exploitation is LIMITED by the fact that default configurations (host_key_checking enabled, host_key_auto_add unset) are not affected, and non-interactive runs fail closed, so only operators who opted into automatic key-adding are exposed. |
| Impact | This is a medium-severity (CVSS 6.5) trust-on-first-use host key verification weakness whose real-world risk is moderate and conditional rather than urgent. The CVSS vector (AV:N/AC:H/PR:N/UI:N/C:H/I:L/A:N) is internally consistent with the mechanism: network vector because exploitation happens over SSH, PR:N because no credential on the Ansible controller is needed by the attacker, and AC:H because the attacker must achieve a machine-in-the-middle position AND the target host must already exist in known_hosts with a now-changed key. The vuln.today decision label is 'this_month' (not act_now/emergency), and there is no CISA KEV listing, no EPSS score supplied, and no public exploit reference in the input - so there is no public exploit identified at time of analysis and no evidence of active exploitation. These signals align: a real but gated defensive-hardening fix rather than a widespread drive-by threat. The most important limiting factor, stated in the description, is that default configurations (host_key_checking enabled, host_key_auto_add unset) are NOT affected and non-interactive runs fail closed; exploitation requires the non-default trust-on-first-use configuration. Note the absence of EPSS data is a gap, not a signal of low risk; it simply could not be factored in. Overall this is a legitimate credential-exposure issue to patch on a normal cycle, not a high-CVSS-but-illusory finding, but also not an emergency given the config and positioning prerequisites. |
| Exploit ScenarioDerived | An attacker who can intercept SSH traffic between an Ansible controller (running the libssh connection plugin with host_key_auto_add, or ansible-pylibssh with AutoAddPolicy) and a managed host impersonates that host and presents a different SSH host key. Because the changed-key state is routed to the same policy hook used for unknown hosts, the controller silently accepts the substitute key instead of aborting, authenticates to the attacker, and runs the play there - disclosing connection credentials. No public exploit is identified at time of analysis; the attack requires an active machine-in-the-middle position and a host already present in known_hosts. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 12, 2026
Host key verification in ansible-pylibssh and the ansible.netcommon libssh connection plugin fails to distinguish a changed host key from an unknown one when trust-on-first-use is explicitly enabled, so a machine-in-the-middle attacker presenting a substitute key is accepted without warning and the controller authenticates to the impostor host. Only operators who set host_key_auto_add on the libssh connection plugin or use AutoAddPolicy in ansible-pylibssh are exposed; default configurations with host_key_checking enabled and host_key_auto_add unset are not affected, and non-interactive runs fail closed. Successful exploitation discloses connection credentials and appends the attacker's key to known_hosts, making future connections to that host silently trusted; no public exploit code has been identified at time of analysis and this is a medium-severity (CVSS 6.5) issue whose risk is conditional rather than urgent.
RemediationAI
No vendor-released patch is identified in the available data at time of analysis, so track the Red Hat advisory at https://access.redhat.com/security/cve/CVE-2026-126641 and Bugzilla 2571719 for the fixed package versions and apply them as soon as they are published. In the interim, the complete mitigation is to stop relying on automatic key adoption: leave host_key_auto_add unset on the ansible.netcommon libssh connection plugin and do not use AutoAddPolicy in ansible-pylibssh, keeping host_key_checking enabled so that a changed key aborts the connection rather than being written to known_hosts. Where first-contact automation genuinely requires key discovery, pre-populate known_hosts out of band with keys verified through a separate trusted channel - the trade-off is that adding new hosts becomes a manual provisioning step, and legitimate host key rotations will fail until the record is updated. Restrict playbook execution to non-interactive runs, which fail closed in the affected code path. Audit existing known_hosts files for keys that do not match the expected fingerprints of managed hosts, since a successful attack appends the attacker's key and leaves a durable trust record that must be removed along with any credentials that may have been sent to the substitute host. Do not treat switching to the paramiko connection backend as equivalent unless it has been validated in your environment, since its BadHostKeyException behaviour differs from the vulnerable libssh path.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The flaw sits in the host key verification path shared by ansible-pylibssh and the ansible.netcommon libssh connection plugin, classified as CWE-322 (Key Exchange without Entity Authentication). SSH clients must distinguish three known_hosts outcomes: host unknown, host known with a matching key, and host known with a different key. pylibssh's Session.verify_knownhost() collapses the SSH_KNOWN_HOSTS_CHANGED and SSH_KNOWN_HOSTS_OTHER states into the same missing_host_key() policy hook that is used for genuinely unknown hosts. The bundled AutoAddPolicy and RejectPolicy classes, plus ansible.netcommon's MyAddPolicy (modeled on paramiko's AutoAddPolicy), respond to that hook by adding the presented key and continuing the connection instead of aborting. Paramiko does not behave this way - a changed key raises BadHostKeyException - so users migrating from paramiko-based connections to the libssh backend lose that protection. The result is that the controller completes authentication to the substitute host and writes the attacker's key into known_hosts. The CVSS vector (AV:N/AC:H/PR:N/UI:N) reflects that no credentials are needed to trigger the logic but that the attacker must already hold an active machine-in-the-middle position on the SSH path; the confidentiality impact is high because connection credentials are exposed, with a limited integrity impact from the play executing on the wrong host. Default configurations do not reach this code path, and non-interactive runs fail closed.
Know when Red Hat Ansible Automation Platform 2 gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N
AC:H because exploitation needs an MITM position plus a pre-existing changed known_hosts entry under non-default config; PR:N since no controller credential is needed; C:H for credential disclosure, I:L for the rogue play/known_hosts write, A:N.
Primary rating from Vendor (redhat).
CVSS VectorVendor: redhat
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Affected Products (CPE)CVE.org
Privilege escalation and remote code execution on managed hosts is possible in Red Hat Ansible Automation Platform 2 bec
Authenticated users who hold permission to create or modify a project within a single organization can execute arbitrary
Missing authorization checks in the Red Hat Ansible Automation Platform 2 automation-controller allow an authenticated o
Credential disclosure in Red Hat Ansible Automation Platform 2.5 and 2.6 allows any authenticated user to retrieve plain
Server-side request forgery in the Red Hat Ansible Automation Platform 2 Controller's HashiCorp Vault credential plugin
Privilege escalation in Red Hat Ansible Automation Platform 2 (built on the AWX upstream project) lets an authenticated
Arbitrary file write in pulpcore's FilesystemExport feature allows an authenticated administrator to escape the intended
Symlink-following file overwrite on the Ansible control node is possible in ansible-core when a user runs `ansible-galax
Stored cross-site scripting in the automation-controller component of Red Hat Ansible Automation Platform 2 lets an auth
An authenticated automation-controller administrator in Red Hat Ansible Automation Platform 2 can turn the administrator
Jinja2 template injection in Ansible Operator Plugins (CWE-1336) lets an authenticated Kubernetes user who can create or
Missing object-level authorization in the JobTemplate copy endpoint (CopyAPIView) of AWX and Red Hat Ansible Automation
EUVD-2026-124341
GHSA-qvc6-2r95-pxqv
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB