CVE-2024-9902
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedA 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 summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceThe ansible-core user module contains a privilege escalation flaw where an unprivileged user can cause a privileged execution to create or replace arbitrary files on the system. When a privileged user runs the user module targeting the unprivileged user's home directory, the unprivileged user can manipulate the path to write to any location and take ownership of those files.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Local
- Complexity
- High
- Privileges
- Low
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- Low
CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Verify ansible-core installation and versionRun 'ansible --version' to confirm ansible-core is installed and note the version numberAffected if The installed version falls within the affected range (if known) or is unpatched
-
Identify playbooks using the user module with privilege escalationSearch playbook files for 'user:' module calls combined with 'become: yes' or 'become_user:' directives using grep or ansible-lintAffected if Playbooks use the user module while running with elevated privileges (become: yes)
-
Check for user module targeting user home directoriesReview identified playbooks to see if the user module 'home:' parameter points to directories within unprivileged user home paths (e.g., /home/*)Affected if The user module is managing home directories under /home/ or other user-writable paths while running as root
-
Inspect home directory permissionsRun 'ls -la /home/' and check if any unprivileged user home directories are writable by other users (other-write bit set)Affected if Home directories have permissive permissions allowing path manipulation by other users
-
Audit task execution logsReview ansible execution logs or run 'ansible-playbook --check' on suspect playbooks to see which user module tasks would execute with becomeAffected if The user module tasks would execute with elevated privileges targeting user-managed directories
You are affected if ansible-core with an unpatched user module runs with privilege escalation against home directories that unprivileged users can manipulate.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
From vendor dataUpgrade ansible-core to the patched version. Alternatively, audit all playbooks using the user module, restrict home directory permissions, and avoid running the user module against untrusted user home directories with elevated privileges.
- Consultation4.0 h
- Implementation8.0 h
- Testing4.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $5,120.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2024-9902 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2024-9902 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data