CVE-2024-9902
Ansible-core: ansible-core user may read/write unauthorized content
- Published
- Updated
- Reserved
- Assigned by
- redhat
Description
A flaw was found in Ansible. The ansible-core `user` module can allow an unprivileged user to silently create or replace the contents of any file on any system path and take ownership of it when a privileged user executes the `user` module against the unprivileged user's home directory. If the unprivileged user has traversal permissions on the directory containing the exploited target file, they retain full control over the contents of the file as its owner.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| redhatCNA (assigner) | 3.1 | Medium6.3 | CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L |
| NVDNVD · Deferred | 3.1 | Medium6.3 | CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L |
- EPSS (exploitation in 30 days)
- 0.26% · top 82% of all CVEs (6 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: total
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 6.3.
Weakness
Affected products
ansible-core
- affected < 2.14.18rc1
- affected 2.15.0b1 – < 2.15.13rc1
- affected 2.16.0b1 – < 2.16.13rc1
- affected 2.17.0b1 – < 2.17.6rc1
- affected 2.18.0b1 – < 2.18.0rc2
Red Hat · Ansible Automation Platform Execution Environments
- unaffected 1.2.0-91 – < *
Red Hat · Ansible Automation Platform Execution Environments
- unaffected 3.0.1-95 – < *
Red Hat · Ansible Automation Platform Execution Environments
- unaffected 2.9.27-32 – < *
Red Hat · Ansible Automation Platform Execution Environments
- unaffected 2.12.10-54 – < *
Red Hat · Ansible Automation Platform Execution Environments
- unaffected 2.15.12-17 – < *
Red Hat · Red Hat Ansible Automation Platform 2.4 for RHEL 8
- unaffected 1:2.15.13-1.el8ap – < *
Red Hat · Red Hat Ansible Automation Platform 2.4 for RHEL 8
- unaffected 1:2.15.13-1.el8ap – < *
Red Hat · Red Hat Ansible Automation Platform 2.4 for RHEL 8
- unaffected 1:2.15.13-1.el8ap – < *
Red Hat · Red Hat Ansible Automation Platform 2.4 for RHEL 9
- unaffected 1:2.15.13-1.el9ap – < *
Red Hat · Red Hat Ansible Automation Platform 2.4 for RHEL 9
- unaffected 1:2.15.13-1.el9ap – < *
Red Hat · Red Hat Ansible Automation Platform 2.4 for RHEL 9
- unaffected 1:2.15.13-1.el9ap – < *
Red Hat · Red Hat Ansible Automation Platform 2.5 for RHEL 8
- unaffected 1:2.16.13-1.el8ap – < *
Red Hat · Red Hat Ansible Automation Platform 2.5 for RHEL 8
- unaffected 1:2.16.13-1.el8ap – < *
Red Hat · Red Hat Ansible Automation Platform 2.5 for RHEL 8
- unaffected 1:2.16.13-1.el8ap – < *
Red Hat · Red Hat Ansible Automation Platform 2.5 for RHEL 9
- unaffected 1:2.16.13-1.el9ap – < *
Red Hat · Red Hat Ansible Automation Platform 2.5 for RHEL 9
- unaffected 1:2.16.13-1.el9ap – < *
Red Hat · Red Hat Ansible Automation Platform 2.5 for RHEL 9
- unaffected 1:2.16.13-1.el9ap – < *
Red Hat · Red Hat OpenStack Platform 17.1 for RHEL 9
- unaffected 0:2.14.2-4.6.el9ost – < *
Red Hat · Red Hat Enterprise Linux 10
All versions: unaffected
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- PyPIansible-coreGHSA-32p4-gm2c-wmch (opens in a new tab)
What to do
Workaround: In the play that uses the user module with the key generation option, have a prior task ensuring the public key does not exist for example: - name: avoid user exploit (change name depending on other options used in user task) file: path=/home/{{username}}/.ssh/id_rsa.pub state=absent
References (7)
- RHSA-2024:10762 (opens in a new tab)vendor-advisoryx_refsource_REDHAT
- RHSA-2024:8969 (opens in a new tab)vendor-advisoryx_refsource_REDHAT
- RHSA-2024:9894 (opens in a new tab)vendor-advisoryx_refsource_REDHAT
- RHSA-2025:1861 (opens in a new tab)vendor-advisoryx_refsource_REDHAT
- https://access.redhat.com/security/cve/CVE-2024-9902 (opens in a new tab)vdb-entryx_refsource_REDHAT
- RHBZ#2318271 (opens in a new tab)issue-trackingx_refsource_REDHAT
- https://lists.debian.org/debian-lts-announce/2024/11/msg00021.html (opens in a new tab)
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-32p4-gm2c-wmch (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2024-9902)Record last updated .