Ansible-core: user module generate_ssh_key follows a symlinked ~/.ssh enabling local privilege escalation (incomplete fix of cve-2024-9902)
Red Hat / Migration Toolkit for Applications 8、Migration Toolkit for Virtualization、OpenShift Service Mesh 3、Red Hat Advanced Cluster Management for Kubernetes 2、Red Hat Ansible Automation Platform 2、Red Hat Ansible Automation Platform Ansible Core 2 +9
CVE 记录列出的受影响产品:Red Hat · Red Hat Ansible Automation Platform 2、Red Hat · Red Hat Ansible Automation Platform Ansible Core 2nday 产品登记表中 Ansible 的产品类型
当前阶段
DIS
披露
CVSS
6.7 MEDIUM v3.1
# 生命周期
横轴 UTC;点=精确到分钟,宽条=仅日期,空心=未知或推定。
时间未知
DIS披露
PAT补丁
尚无记录
ANA分析
尚无记录
POCPoC
尚无记录
ITW在野
尚无记录
KEVKEV
尚无记录
# 摘要
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.