CVE-2024-9902

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

Published Nov 6, 2024 CVSS 3.1 · 6.3 Medium EPSS < 1% KEV · Not listed
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.

Remediation

Vendor 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

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-3963-1 ansible security update
EUVD EUVD EUVD-2024-3182 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.
Github GHSA Github GHSA GHSA-32p4-gm2c-wmch ansible-core Incorrect Authorization vulnerability
History
Type Values Removed Values Added
CPEs cpe:/o:redhat:enterprise_linux:10 cpe:/a:redhat:enterprise_linux:10
Type Values Removed Values Added
First Time appeared Redhat ansible Core
CPEs cpe:/a:redhat:ansible_automation_platform:ee::el9 cpe:/a:redhat:ansible_core:2::el8
cpe:/a:redhat:ansible_core:2::el9
Vendors & Products Redhat ansible Core
Type Values Removed Values Added
Metrics epss

{'score': 0.00044}

epss

{'score': 0.0004}

Type Values Removed Values Added
Metrics epss

{'score': 0.00037}

epss

{'score': 0.00044}

Type Values Removed Values Added
First Time appeared Redhat enterprise Linux
CPEs cpe:/o:redhat:enterprise_linux:10
Vendors & Products Redhat enterprise Linux
Type Values Removed Values Added
CPEs cpe:/a:redhat:openstack:17.1 cpe:/a:redhat:openstack:17.1::el9
References
Type Values Removed Values Added
CPEs cpe:/a:redhat:ansible_automation_platform:2.4::el8
cpe:/a:redhat:ansible_automation_platform:2.4::el9
cpe:/a:redhat:ansible_automation_platform_developer:2.4::el8
cpe:/a:redhat:ansible_automation_platform_developer:2.4::el9
cpe:/a:redhat:ansible_automation_platform_inside:2.4::el8
cpe:/a:redhat:ansible_automation_platform_inside:2.4::el9
References
Type Values Removed Values Added
First Time appeared Redhat ansible Automation Platform Developer
Redhat ansible Automation Platform Inside
CPEs cpe:/a:redhat:ansible_automation_platform:2 cpe:/a:redhat:ansible_automation_platform_developer:2.5::el8
cpe:/a:redhat:ansible_automation_platform_developer:2.5::el9
cpe:/a:redhat:ansible_automation_platform_inside:2.5::el8
cpe:/a:redhat:ansible_automation_platform_inside:2.5::el9
Vendors & Products Redhat ansible Automation Platform Developer
Redhat ansible Automation Platform Inside
References
Type Values Removed Values Added
CPEs cpe:/a:redhat:ansible_automation_platform:2.5::el8
cpe:/a:redhat:ansible_automation_platform:2.5::el9
Type Values Removed Values Added
CPEs cpe:/a:redhat:ansible_automation_platform:ee::el8
cpe:/a:redhat:ansible_automation_platform:ee::el9
References
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title Ansible-core: ansible-core user may read/write unauthorized content
First Time appeared Redhat
Redhat ansible Automation Platform
Redhat openstack
Weaknesses CWE-863
CPEs cpe:/a:redhat:ansible_automation_platform:2
cpe:/a:redhat:openstack:17.1
Vendors & Products Redhat
Redhat ansible Automation Platform
Redhat openstack
References
Metrics cvssV3_1

{'score': 6.3, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
redhat
Published
Updated
Nov 5, 2026, 2:45 PM
Reserved
Oct 12, 2024, 2:46 AM
Status
Deferred
Published
Nov 6, 2024, 10:15 AM
Modified
Nov 5, 2026, 3:17 PM
Severity
Moderate
Public date
Nov 6, 2024, 6:11 AM