CVE-2026-11837

Ansible-collection-ansible-posix: ansible.posix authorized_key: local privilege escalation via symlink-following chown

Published Jun 10, 2026 CVSS 3.1 · 7.3 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

A vulnerability in the ansible.posix authorized_key module allows an unprivileged local user to create symbolic links in their ~/.ssh directory. When an operator runs the authorized_key task as root, the module’s keyfile() function performs an os.chown() on the targeted file without preventing symlink resolution, which can redirect the ownership change to an arbitrary system path. This results in the attacker gaining ownership of files they should not have access to, effectively elevating privileges on the local system. The weakness is a classic symlink‑follow security flaw (CWE‑59).

Affected Systems

Red Hat Enterprise Linux 10, Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9, Red Hat OpenStack Platform 17.1, and Red Hat OpenStack Platform 18.0

Risk and Exploitability

The CVSS score of 7.3 indicates high severity. EPSS information is not available and the vulnerability is not listed in CISA's KEV catalog. The attack vector is local; the attacker must have a user account on the host and must be able to pre‑stage the symlink in their own ~/.ssh directory before an operator executes the authorized_key task with elevated privileges. Once the symlink exists, the privileged run will change ownership of the target file, thus enabling local privilege escalation. The risk remains significant until a fix is applied, as the path to exploitation is straightforward and requires no specialized expertise beyond normal local access.

Remediation

Vendor Workaround

The following practices would help for avoiding exposure and mitigate this flaw: 1) Do not run the ansible.posix authorized_key module with elevated privileges against untrusted user accounts. 2) Validate that target user home directories do not contain unexpected symbolic links before running playbooks.


OpenCVE Recommended Actions

  • Apply the vendor‑provided patch or upgrade ansible.posix to a version where keyfile() uses os.lchown() or includes O_NOFOLLOW protection.
  • Avoid running the ansible.posix authorized_key module with root privileges when targeting accounts that could be misused by local users.
  • Before running playbooks, inspect target user home directories for unexpected symbolic links and remove or correct them.

Generated by OpenCVE AI on June 10, 2026 at 06:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
CPEs cpe:/o:redhat:enterprise_linux:10
cpe:/o:redhat:enterprise_linux:8
cpe:/o:redhat:enterprise_linux:9
cpe:/a:redhat:enterprise_linux:10
cpe:/a:redhat:enterprise_linux:8
cpe:/a:redhat:enterprise_linux:9
Type Values Removed Values Added
CPEs cpe:/o:redhat:enterprise_linux:10.2
References
Type Values Removed Values Added
First Time appeared Redhat rhel E4s
Redhat rhel Tus
CPEs cpe:/a:redhat:rhel_e4s:8.8::appstream
cpe:/a:redhat:rhel_tus:8.8::appstream
Vendors & Products Redhat rhel E4s
Redhat rhel Tus
References
Type Values Removed Values Added
First Time appeared Redhat rhel Aus
Redhat rhel Eus Long Life
CPEs cpe:/a:redhat:rhel_aus:8.6::appstream
cpe:/a:redhat:rhel_eus_long_life:8.6::appstream
Vendors & Products Redhat rhel Aus
Redhat rhel Eus Long Life
References
Type Values Removed Values Added
First Time appeared Redhat enterprise Linux Eus
CPEs cpe:/o:redhat:enterprise_linux_eus:10.0
Vendors & Products Redhat enterprise Linux Eus
References
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Redhat openstack Platform
Vendors & Products Redhat openstack Platform
Type Values Removed Values Added
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.
Title Ansible-collection-ansible-posix: ansible.posix authorized_key: local privilege escalation via symlink-following chown
First Time appeared Redhat
Redhat enterprise Linux
Redhat openstack
Weaknesses CWE-59
CPEs cpe:/a:redhat:openstack:17.1
cpe:/a:redhat:openstack:18.0
cpe:/o:redhat:enterprise_linux:10
cpe:/o:redhat:enterprise_linux:8
cpe:/o:redhat:enterprise_linux:9
Vendors & Products Redhat
Redhat enterprise Linux
Redhat openstack
References
Metrics cvssV3_1

{'score': 7.3, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H'}

Weaknesses
  • CWE-59

    Improper Link Resolution Before File Access ('Link Following')

Sources

Status
PUBLISHED
Assigner
redhat
Published
Updated
Nov 4, 2026, 9:51 PM
Reserved
Jun 10, 2026, 4:10 AM
Status
Awaiting Analysis
Published
Jun 10, 2026, 5:16 AM
Modified
Nov 4, 2026, 10:17 PM
Severity
Important
Public date
Jun 10, 2026, 12:00 AM