Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2024-9902: Incorrect Authorization

0
Medium
VulnerabilityCVE-2024-9902cvecve-2024-9902
Published: Wed Nov 06 2024 (11/06/2024, 09:56:54 UTC)
Source: CVE Database V5

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.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 02/27/2026, 17:35:40 UTC

Technical Analysis

CVE-2024-9902 is a security vulnerability identified in the ansible-core user module, specifically affecting versions 0, 2.15.0b1, 2.16.0b1, 2.17.0b1, and 2.18.0b1. The flaw arises from incorrect authorization checks that allow an unprivileged user to silently create or replace the contents of any file on any system path, provided that a privileged user executes the ansible-core user module against the unprivileged user's home directory. The vulnerability exploits the interaction between user permissions and the module's file handling logic. If the unprivileged user has directory traversal permissions on the directory containing the target file, they can maintain full control over the file contents as its owner after exploitation. This means an attacker can escalate privileges by manipulating files that should be protected, potentially leading to unauthorized access or modification of sensitive data. The vulnerability requires local access with limited privileges and user interaction (the privileged user running the module). The CVSS 3.1 score of 6.3 reflects medium severity, with high impact on confidentiality and integrity but limited availability impact. No public exploits have been reported yet, but the flaw poses a significant risk in environments where ansible-core is used for automation and configuration management, especially in multi-user systems or shared environments.

Potential Impact

The impact of CVE-2024-9902 is primarily a local privilege escalation and unauthorized file manipulation risk. An attacker with unprivileged access can leverage this vulnerability to overwrite or create arbitrary files on the system, potentially injecting malicious code, altering configuration files, or gaining persistent access by modifying critical system files. This compromises confidentiality and integrity of the system and data. In enterprise environments where ansible-core is widely used for automated configuration management, this vulnerability could be exploited to undermine system security, disrupt operations, or facilitate further attacks. Although exploitation requires local access and user interaction, the ability to silently replace files and take ownership can lead to significant damage if combined with other attack vectors. The vulnerability could affect cloud environments, CI/CD pipelines, and on-premises servers where ansible-core is deployed, increasing the risk of widespread compromise if not mitigated.

Mitigation Recommendations

To mitigate CVE-2024-9902, organizations should immediately upgrade ansible-core to a patched version beyond 2.18.0b1 once available. Until patches are applied, restrict directory traversal and write permissions for unprivileged users, especially in home directories and directories containing sensitive files. Implement strict access controls and audit permissions on directories that could be targeted. Limit the execution of ansible-core user module commands to trusted administrators and avoid running them against unprivileged user directories without thorough validation. Employ monitoring and alerting for unexpected file modifications in critical system paths. Additionally, consider isolating automation environments and using containerization or sandboxing to reduce the impact of potential exploitation. Regularly review and harden file system permissions and user roles to minimize the attack surface. Finally, educate privileged users about the risks of running ansible-core commands on untrusted user directories.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
redhat
Date Reserved
2024-10-12T02:46:57.580Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 6909325c35043901e83099e5

Added to database: 11/3/2025, 10:53:16 PM

Last enriched: 2/27/2026, 5:35:40 PM

Last updated: 3/26/2026, 8:01:29 AM

Views: 130

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses