VulnWatch by ve1ve2
medium 6.7 EPSS 0.25%

CVE-2026-123037: 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 ~/.…

Source:
NVD CVE API 2.0
Published:
Fetched:
Updated:

https://nvd.nist.gov/vuln/detail/CVE-2026-123037 ↗

CWE-59

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. References: https://access.redhat.com/security/cve/CVE-2026-123037 https://bugzilla.redhat.com/show_bug.cgi?id=2567189

Linked vulnerabilities (2)

CVE-2024-9902 medium 6.3 EPSS 0.25% (p16) NVDCVE.org
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L

A flaw was found in Ansible. The ansible-core `user` module can allow an unprivileged user to silently create or replace the contents of any file on any system path and take ownership of it when a privileged user executes the `user` module against the unprivileged user's home directory. If the unprivileged user has traversal permissions on the directory containing the exploited target file, they retain full control over the contents of the file as its owner.

CWE: CWE-863NVD: Deferred
CVE-2026-123037 medium 6.7 EPSS 0.14% (p3) NVDCVE.org
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H

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...

CWE: CWE-59Aliases: CVE-2024-9902NVD: Awaiting Analysis

Also reported by (1)