Ansible-collection-ansible-posix: ansible.posix authorized_key: local privilege escalation via symlink-following chown
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- 1 proof of concept on GitHub
- Exploitation: none
- Automatable: no
- Technical impact: total
Summary
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.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: total
- Record last updated
Affected versions
- rhc-worker-playbook
Version range not reported
- rhc-worker-playbook
Version range not reported
- rhc-worker-playbook
Version range not reported
- rhc-worker-playbook
Version range not reported
- rhc-worker-playbook
Version range not reported
- rhc-worker-playbook
Version range not reported
- rhel-system-roles
Version range not reported
- rhc-worker-playbook
Version range not reported
- rhel-system-roles
Version range not reported
- rhc-worker-playbook
Version range not reported
- rhel-system-roles
Version range not reported
- ansible-collection-ansible-posix
Version range not reported
- ansible-collection-ansible-posix
Version range not reported