# CVE-2026-123037: Ansible-core: user module generate\_ssh\_key follows a symlinked ~/.ssh enabling local privilege escalation (incomplete fix of cve-2024-9902)

- Priority: **Routine**
- Reason: Not severe (CVSS 6.7, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-11-06 · Modified: 2026-11-24
- Aliases: DEBIAN-CVE-2026-123037, UBUNTU-CVE-2026-123037
- Record: https://cvemate.com/vulnerability/CVE-2026-123037 · JSON: https://cvemate.com/vulnerability/CVE-2026-123037/json

## Description

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

## Signals

- CVSS: 6.7 medium (v3.1, CVE.org) CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
- EPSS: 0.141%, percentile 3.585%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- debian ansible-core (Debian): All versions (No fix recorded)
- ubuntu ansible (Ubuntu): All versions (No fix recorded)
- ubuntu ansible-core (Ubuntu): All versions (No fix recorded)

## References

- <https://access.redhat.com/security/cve/CVE-2026-123037>
- <https://bugzilla.redhat.com/show_bug.cgi?id=2567189>
- <https://security-tracker.debian.org/tracker/CVE-2026-123037>
- <https://ubuntu.com/security/CVE-2026-123037>
- <https://www.cve.org/CVERecord?id=CVE-2026-123037>

---

Data as of 2026-12-05T07:23:29.924Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
