CVE-2026-123037
Ansible-core: user module generate_ssh_key follows a symlinked ~/.ssh enabling local privilege escalation (incomplete fix of cve-2024-9902)
A flaw was found in the ansible-core user module. When generate_ssh_key is enabled, User.ssh_key_gen() guards the key files against symlinks but checks the ~/.ssh directory only with os.path.exists(). An unprivileged user on a managed node who replaces their ~/.ssh with a symlink to an existing root-writable directory causes the privileged module to write the generated key pair through the symlink and then chown both files to that user. Because such files can be dropped into directories processed by schedulers (e.g. /etc/cron.daily) or dynamic MOTD (/etc/update-motd.d), the user can escalate to root on the managed node. This is an incomplete fix of CVE-2024-9902.
Fixes and workarounds
Workaround
Do not use generate_ssh_key: yes against accounts whose home directory is controlled by an untrusted user; pre-create ~/.ssh as a real directory owned appropriately before running the module, or generate the key as the target account itself (dropping to its uid/gid) rather than as root.
Source: CNA: redhatAffected products and versions
| Product | Versions | Authority |
|---|---|---|
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-24/hub-rhel8
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-24/lightspeed-rhel8
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-25/controller-rhel8-operator
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-25/de-minimal-rhel8
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-25/de-supported-rhel8
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-25/eda-controller-rhel8
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-25/eda-controller-rhel8-operator
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: unaffected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-25/ee-minimal-rhel8
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-25/ee-minimal-rhel9
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-25/ee-supported-rhel8
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-25/ee-supported-rhel9
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-25/gateway-rhel8-operator
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-25/hub-rhel8
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-25/hub-rhel8-operator
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-25/lightspeed-rhel8
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-25/lightspeed-rhel8-operator
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-25/platform-resource-rhel8-operator
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-25/platform-resource-runner-rhel8
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-26/controller-rhel9-operator
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-26/de-minimal-rhel9
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-26/de-supported-rhel9
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-26/eda-controller-rhel9
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-26/eda-controller-rhel9-operator
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-26/ee-minimal-rhel9
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-26/ee-supported-rhel9
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-26/gateway-rhel9-operator
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-26/hub-rhel9
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-26/hub-rhel9-operator
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-26/lightspeed-rhel9
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-26/lightspeed-rhel9-operator
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-26/platform-resource-rhel9-operator
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-26/platform-resource-runner-rhel9
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-27/aap-cloud-billing-operator-rhel9
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-27/controller-rhel9-operator
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-27/de-minimal-rhel9
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-27/de-supported-rhel9
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-27/eda-controller-rhel9
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-27/eda-controller-rhel9-operator
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-27/ee-minimal-rhel9
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-27/ee-supported-rhel9
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-27/gateway-rhel9-operator
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-27/hub-rhel9
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-27/hub-rhel9-operator
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-27/lightspeed-rhel9
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-27/lightspeed-rhel9-operator
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-27/metrics-service-rhel9-operator
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-27/platform-resource-rhel9-operator
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-27/platform-resource-runner-rhel9
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-tech-preview/ansible-devspaces-rhel9
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-automation-platform-tech-preview/metrics-service-rhel9-operator
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2 Red Hat ansible-core
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform Ansible Core 2 Red Hat ansible-automation-platform/ee-minimal-rhel8
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform Ansible Core 2 Red Hat ansible-automation-platform/ee-minimal-rhel9
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform Ansible Core 2 Red Hat ansible-automation-platform-tech-preview/ee-minimal-rhel8
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform Ansible Core 2 Red Hat ansible-automation-platform-tech-preview/ee-minimal-rhel9
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
| Self-service automation portal 2 Red Hat ansible-automation-platform/bootc-automation-portal-rhel9
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: affected |
CNA: redhat |
Version ranges are source assertions. Check the vendor advisory and your installed configuration before determining exposure.
CVSS assessments
| Version / score | Vector | Authority |
|---|---|---|
| 3.1 / 6.7 medium |
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H | CNA: redhat |
Exploit evidence
No exploit evidence in collected sources. This is not proof of no exploitation.
References
- https://access.redhat.com/security/cve/CVE-2026-123037CNA: redhat · vdb-entry, x_refsource_REDHAT
- https://bugzilla.redhat.com/show_bug.cgi?id=2567189CNA: redhat · issue-tracking, x_refsource_REDHAT
For agents and automation
Read public disclosures for free as Markdown or JSON. Compatible browsers also expose native WebMCP tools to search disclosures, read this page, and discover API access.
Use the ontology-linked Cyber API with x402 pay per request, or a Y2 Pro or Elite API key with the intel:cyber scope.
Endpoints and access details
https://api.y2.dev/api/v2/cyber/cveshttps://api.y2.dev/api/v2/cyber/cves/{cveId}
A workspace owner or admin can create a Pro or Elite API key. Send Authorization: Bearer <Y2_API_KEY> from your trusted agent runtime.
For x402, omit Authorization and read the HTTP 402 payment challenge before signing a retry. Public browser tools do not make payments.