{"id":"CVE-2026-123037","kind":"vulnerability","aliases":["CVE-2026-123037"],"related":[],"title":"Ansible-core user module lets local user escalate to root via symlink","description":"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.","summary":"When the Ansible user module generates SSH keys, it checks the ~/.ssh directory only for existence, not for symlinks. A local unprivileged user on a managed node can redirect the write to a root-writable directory and gain root.","severity":"medium","cvss":6.7,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["ansible-core","linux","package","self-hosted"],"not_affected_if":["generate-ssh-key-disabled","no-local-untrusted-users"],"how_to_check":"- Check the installed version with `ansible-core --version` on managed nodes and controllers.\n- Look for tasks that call the `user` module with `generate_ssh_key: true` in playbooks.","fix":null,"status":"open","published_at":"2026-11-06T06:16:42+00:00","first_seen_at":"2026-11-06T06:40:12+00:00","triaged_at":"2026-11-06T06:41:34+00:00","updated_at":"2026-11-06T06:41:34+00:00","category":"package","confidence":0.6,"triage":{"at":"2026-11-06T06:41:34Z","model":"claude-haiku-5-5","output":{"fix":"unknown","reach":"local","title":"Ansible-core user module lets local user escalate to root via symlink","impact":"high","summary":"When the Ansible user module generates SSH keys, it checks the ~/.ssh directory only for existence, not for symlinks. A local unprivileged user on a managed node can redirect the write to a root-writable directory and gain root.","audience":"businesses","category":"package","nicknames":[],"who_cares":["ansible-core","linux","self-hosted"],"confidence":0.6,"fix_status":"unknown","needs_auth":"yes","worst_case":"local user gains root on managed node","analyst_note":"Find the fixed ansible-core version and whether the CVE-2024-9902 fix status is confirmed in the NVD or Ansible advisory.","how_to_check":"- Check the installed version with `ansible-core --version` on managed nodes and controllers.\n- Look for tasks that call the `user` module with `generate_ssh_key: true` in playbooks.\n- unknown for fixed version: the sources do not say.","plain_action":"","needs_analyst":true,"not_affected_if":["generate-ssh-key-disabled","no-local-untrusted-users"],"who_is_affected":"Exposure requires the ansible-core user module running with generate_ssh_key enabled on a managed node where an unprivileged local user can log in. Systems that never run that module with key generation, or where no local untrusted users exist, are less exposed. The sources do not name specific affected version ranges.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"unknown"},"cost_usd":0.000708,"input_tokens":4335,"output_tokens":548,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-123037':16A,19A '-2024':178C '-2026':15A,18A '-9902':179C '/.ssh':39B,97C,112C '/etc/cron.daily':156C '/etc/update-motd.d':160C 'ansibl':2A,21B,30B,75C 'ansible-cor':1A,20B,74C 'caus':123C 'check':37B,95C 'chown':138C 'core':3A,22B,76C 'cve':14A,17A,177C 'directori':40B,64B,98C,122C,151C 'drop':149C 'dynam':158C 'e.g':155C 'enabl':84C 'escal':9A,164C 'exist':43B,118C 'file':91C,140C,146C 'fix':175C 'flaw':69C 'found':71C 'gain':66B 'gen':87C 'generat':33B,80C,130C 'guard':88C 'host':27B 'incomplet':174C 'key':35B,82C,86C,90C,131C 'let':6A 'linux':23B 'local':7A,48B 'manag':53B,107C,169C 'modul':5A,32B,78C,126C 'motd':159C 'node':54B,108C,170C 'os.path.exists':101C 'packag':24B 'pair':132C 'privileg':125C 'process':152C 'redirect':56B 'replac':110C 'root':11A,62B,67B,120C,166C 'root-writ':61B,119C 'schedul':154C 'self':26B 'self-host':25B 'ssh':34B,81C 'symlink':13A,46B,93C,115C,135C 'unprivileg':49B,103C 'user':4A,8A,31B,50B,77C,104C,143C,162C 'user.ssh':85C 'via':12A 'writabl':63B,121C 'write':58B,128C","nicknames":[],"mitigations":[],"who_affected":"Exposure requires the ansible-core user module running with generate_ssh_key enabled on a managed node where an unprivileged local user can log in. Systems that never run that module with key generation, or where no local untrusted users exist, are less exposed. The sources do not name specific affected version ranges.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"none","audience":"businesses","plain_action":null,"pkeys":[],"ptokens":[],"labels":["ansiblecore","linux","medium","package","selfhosted"],"campaign_type":null,"search_a":"'-123037':16A,19A '-2026':15A,18A 'ansibl':2A 'ansible-cor':1A 'core':3A 'cve':14A,17A 'escal':9A 'let':6A 'local':7A 'modul':5A 'root':11A 'symlink':13A 'user':4A,8A 'via':12A","search_b":"'/.ssh':39B 'ansibl':21B,30B 'ansible-cor':20B 'check':37B 'core':22B 'directori':40B,64B 'exist':43B 'gain':66B 'generat':33B 'host':27B 'key':35B 'linux':23B 'local':48B 'manag':53B 'modul':32B 'node':54B 'packag':24B 'redirect':56B 'root':62B,67B 'root-writ':61B 'self':26B 'self-host':25B 'ssh':34B 'symlink':46B 'unprivileg':49B 'user':31B,50B 'writabl':63B 'write':58B","search_c":"'-2024':178C '-9902':179C '/.ssh':97C,112C '/etc/cron.daily':156C '/etc/update-motd.d':160C 'ansibl':75C 'ansible-cor':74C 'caus':123C 'check':95C 'chown':138C 'core':76C 'cve':177C 'directori':98C,122C,151C 'drop':149C 'dynam':158C 'e.g':155C 'enabl':84C 'escal':164C 'exist':118C 'file':91C,140C,146C 'fix':175C 'flaw':69C 'found':71C 'gen':87C 'generat':80C,130C 'guard':88C 'incomplet':174C 'key':82C,86C,90C,131C 'manag':107C,169C 'modul':78C,126C 'motd':159C 'node':108C,170C 'os.path.exists':101C 'pair':132C 'privileg':125C 'process':152C 'replac':110C 'root':120C,166C 'root-writ':119C 'schedul':154C 'ssh':81C 'symlink':93C,115C,135C 'unprivileg':103C 'user':77C,104C,143C,162C 'user.ssh':85C 'writabl':121C 'write':128C","first_public_at":"2026-11-06T06:16:42+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H","cvss_by":"secalert@redhat.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-123037","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-123037","severity":null,"published_at":"2026-11-06T06:16:42+00:00","modified_at":"2026-11-06T06:16:42+00:00","first_seen_at":"2026-11-06T06:40:12+00:00","fetched_at":"2026-11-06T06:40:12+00:00","note":null}],"documents":[],"exploit_sources":[],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}