# CVE-2024-9902: Ansible-core: ansible-core user may read/write unauthorized content

Status: published. Published: 2024-11-06. Updated: 2026-11-05.

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.

## Remediation

- 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

-  /  (ansible-core): ≥ 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). Source: CNA: redhat
- Red Hat / Ansible Automation Platform Execution Environments (ansible-automation-platform/ansible-builder-rhel8): ≥ 1.2.0-91; < * (unaffected, rpm). Source: CNA: redhat
- Red Hat / Ansible Automation Platform Execution Environments (ansible-automation-platform/ansible-builder-rhel9): ≥ 3.0.1-95; < * (unaffected, rpm). Source: CNA: redhat
- Red Hat / Ansible Automation Platform Execution Environments (ansible-automation-platform/ee-29-rhel8): ≥ 2.9.27-32; < * (unaffected, rpm). Source: CNA: redhat
- Red Hat / Ansible Automation Platform Execution Environments (ansible-automation-platform/ee-minimal-rhel8): ≥ 2.12.10-54; < * (unaffected, rpm). Source: CNA: redhat
- Red Hat / Ansible Automation Platform Execution Environments (ansible-automation-platform/ee-minimal-rhel9): ≥ 2.15.12-17; < * (unaffected, rpm). Source: CNA: redhat
- Red Hat / Red Hat Ansible Automation Platform 2.4 for RHEL 8 (ansible-core): ≥ 1:2.15.13-1.el8ap; < * (unaffected, rpm). Source: CNA: redhat
- Red Hat / Red Hat Ansible Automation Platform 2.4 for RHEL 9 (ansible-core): ≥ 1:2.15.13-1.el9ap; < * (unaffected, rpm). Source: CNA: redhat
- Red Hat / Red Hat Ansible Automation Platform 2.5 for RHEL 8 (ansible-core): ≥ 1:2.16.13-1.el8ap; < * (unaffected, rpm). Source: CNA: redhat
- Red Hat / Red Hat Ansible Automation Platform 2.5 for RHEL 9 (ansible-core): ≥ 1:2.16.13-1.el9ap; < * (unaffected, rpm). Source: CNA: redhat
- Red Hat / Red Hat OpenStack Platform 17.1 for RHEL 9 (openstack-ansible-core): ≥ 0:2.14.2-4.6.el9ost; < * (unaffected, rpm). Source: CNA: redhat
- Red Hat / Red Hat Enterprise Linux 10 (ansible-core): Version range not reported. Source: CNA: redhat

## Severity and prioritization

- CVSS 3.1: 6.3 (medium); CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L; source: CNA: redhat

- CISA KEV: No listing in collected sources

- EPSS: 0.26% as of 2026-11-05; percentile 17.63%

- SSVC: exploitation none; automatable no; technical impact total; source ADP: CISA-ADP

- Weaknesses: CWE-863

## Exploit evidence

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

## References

- https://access.redhat.com/errata/RHSA-2024:10762 (CNA: redhat; vendor-advisory, x_refsource_REDHAT)

- https://access.redhat.com/errata/RHSA-2024:8969 (CNA: redhat; vendor-advisory, x_refsource_REDHAT)

- https://access.redhat.com/errata/RHSA-2024:9894 (CNA: redhat; vendor-advisory, x_refsource_REDHAT)

- https://access.redhat.com/errata/RHSA-2025:1861 (CNA: redhat; vendor-advisory, x_refsource_REDHAT)

- https://access.redhat.com/security/cve/CVE-2024-9902 (CNA: redhat; vdb-entry, x_refsource_REDHAT)

- https://bugzilla.redhat.com/show_bug.cgi?id=2318271 (CNA: redhat; issue-tracking, x_refsource_REDHAT)

- https://lists.debian.org/debian-lts-announce/2024/11/msg00021.html (ADP: CVE)

## Provenance

- CNA: redhat: https://www.cve.org/CVERecord?id=CVE-2024-9902; retrieved 2026-11-05; source updated 2026-11-05

- FIRST EPSS: https://api.first.org/data/v1/epss?cve=CVE-2024-9902; retrieved 2026-11-05; source updated Not reported

Revision: 2bc0526756bea8a41d348114988c587f09ec5fddc2ae914bce2fbb09fd08f163

Canonical: https://y2.dev/cve/CVE-2024-9902

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.