Public vulnerability disclosure

CVE-2024-9902

Ansible-core: ansible-core user may read/write unauthorized content

publishedCWE-863

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.

Technical severity6.3 mediumCVSS 3.1 · CNA: redhat
Published2024-11-06Source updated 2026-11-05
Collected2026-11-052 attributed sources

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: redhat

Affected products and versions

Affected products, source version ranges and reporting authorities
ProductVersionsAuthority


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

CVSS scores, vectors and reporting authorities
Version / scoreVectorAuthority
3.1 / 6.3
medium
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:LCNA: redhat

Exploit evidence

No exploit evidence in collected sources. This is not proof of no exploitation.

References

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/cves
https://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.

Agent access JSON · OpenAPI · CVE API guide