CVE-2024-9902
Ansible-core: ansible-core user may read/write unauthorized content
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.
Fixes and workarounds
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
Source: CNA: redhatAffected products and versions
| Product | Versions | Authority |
|---|---|---|
ansible-core
https://github.com/ansible/ansible |
≥ 0; < 2.14.18rc1 (affected, custom) ≥ 2.15.0b1; < 2.15.13rc1 (affected, custom) ≥ 2.16.0b1; < 2.16.13rc1 (affected, custom) ≥ 2.17.0b1; < 2.17.6rc1 (affected, custom) ≥ 2.18.0b1; < 2.18.0rc2 (affected, custom) Other versions: unaffected |
CNA: redhat |
| Ansible Automation Platform Execution Environments Red Hat ansible-automation-platform/ansible-builder-rhel8
https://catalog.redhat.com/software/containers/ |
≥ 1.2.0-91; < * (unaffected, rpm)
Other versions: affected |
CNA: redhat |
| Ansible Automation Platform Execution Environments Red Hat ansible-automation-platform/ansible-builder-rhel9
https://catalog.redhat.com/software/containers/ |
≥ 3.0.1-95; < * (unaffected, rpm)
Other versions: affected |
CNA: redhat |
| Ansible Automation Platform Execution Environments Red Hat ansible-automation-platform/ee-29-rhel8
https://catalog.redhat.com/software/containers/ |
≥ 2.9.27-32; < * (unaffected, rpm)
Other versions: affected |
CNA: redhat |
| Ansible Automation Platform Execution Environments Red Hat ansible-automation-platform/ee-minimal-rhel8
https://catalog.redhat.com/software/containers/ |
≥ 2.12.10-54; < * (unaffected, rpm)
Other versions: affected |
CNA: redhat |
| Ansible Automation Platform Execution Environments Red Hat ansible-automation-platform/ee-minimal-rhel9
https://catalog.redhat.com/software/containers/ |
≥ 2.15.12-17; < * (unaffected, rpm)
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2.4 for RHEL 8 Red Hat ansible-core
https://access.redhat.com/downloads/content/package-browser/ |
≥ 1:2.15.13-1.el8ap; < * (unaffected, rpm)
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2.4 for RHEL 9 Red Hat ansible-core
https://access.redhat.com/downloads/content/package-browser/ |
≥ 1:2.15.13-1.el9ap; < * (unaffected, rpm)
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2.5 for RHEL 8 Red Hat ansible-core
https://access.redhat.com/downloads/content/package-browser/ |
≥ 1:2.16.13-1.el8ap; < * (unaffected, rpm)
Other versions: affected |
CNA: redhat |
| Red Hat Ansible Automation Platform 2.5 for RHEL 9 Red Hat ansible-core
https://access.redhat.com/downloads/content/package-browser/ |
≥ 1:2.16.13-1.el9ap; < * (unaffected, rpm)
Other versions: affected |
CNA: redhat |
| Red Hat OpenStack Platform 17.1 for RHEL 9 Red Hat openstack-ansible-core
https://access.redhat.com/downloads/content/package-browser/ |
≥ 0:2.14.2-4.6.el9ost; < * (unaffected, rpm)
Other versions: affected |
CNA: redhat |
| Red Hat Enterprise Linux 10 Red Hat ansible-core
https://access.redhat.com/downloads/content/package-browser/ |
Range not reported
Other versions: unaffected |
CNA: redhat |
Version ranges are source assertions. Check the vendor advisory and your installed configuration before determining exposure.
CVSS assessments
| Version / score | Vector | Authority |
|---|---|---|
| 3.1 / 6.3 medium |
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L | CNA: redhat |
Exploit evidence
No exploit evidence in collected sources. This is not proof of no exploitation.
References
- https://access.redhat.com/errata/RHSA-2024:10762CNA: redhat · vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2024:8969CNA: redhat · vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2024:9894CNA: redhat · vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2025:1861CNA: redhat · vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/security/cve/CVE-2024-9902CNA: redhat · vdb-entry, x_refsource_REDHAT
- https://bugzilla.redhat.com/show_bug.cgi?id=2318271CNA: redhat · issue-tracking, x_refsource_REDHAT
- https://lists.debian.org/debian-lts-announce/2024/11/msg00021.htmlADP: CVE
For agents and automation
Read public disclosures for free as Markdown or JSON. Compatible browsers also expose native WebMCP tools to search disclosures, read this page, and discover API access.
Use the ontology-linked Cyber API with x402 pay per request, or a Y2 Pro or Elite API key with the intel:cyber scope.
Endpoints and access details
https://api.y2.dev/api/v2/cyber/cveshttps://api.y2.dev/api/v2/cyber/cves/{cveId}
A workspace owner or admin can create a Pro or Elite API key. Send Authorization: Bearer <Y2_API_KEY> from your trusted agent runtime.
For x402, omit Authorization and read the HTTP 402 payment challenge before signing a retry. Public browser tools do not make payments.