CVE-2026-11837
ansible-collection-ansible-posix: ansible.posix authorized_key: local privilege escalation via symlink-following chown
Severity
ImportantRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · June 10, 2026
Updated · November 3, 2026
Description
A local privilege escalation vulnerability was found in the ansible.posix authorized_key module. The module's keyfile() function uses os.chown() instead of os.lchown() and opens files without O_NOFOLLOW when managing SSH authorized keys. An unprivileged local user can pre-stage symbolic links in their ~/.ssh directory to redirect file ownership changes to arbitrary system paths when an operator runs the authorized_key task as root, leading to local privilege escalation.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
The following practices would help for avoiding exposure and mitigate this flaw:
- Do not run the ansible.posix authorized_key module with elevated privileges against untrusted user accounts.
- Validate that target user home directories do not contain unexpected symbolic links before running playbooks.
CVSS / CWE
CVSS 3.1 · 7.3CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
CWE-59 · Improper Link Resolution Before File Access