CVE-2024-9902

Summary

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.

Affected Software

VendorProductVersion RangeStatus
0 < 2.14.18rc1affected
2.15.0b1 < 2.15.13rc1affected
2.16.0b1 < 2.16.13rc1affected
2.17.0b1 < 2.17.6rc1affected
2.18.0b1 < 2.18.0rc2affected
Red HatAnsible Automation Platform Execution Environments3.0.1-96 < *unaffected
Red HatAnsible Automation Platform Execution Environments3.0.1-95 < *unaffected
Red HatAnsible Automation Platform Execution Environments2.9.27-32 < *unaffected
Red HatAnsible Automation Platform Execution Environments2.14.13-21 < *unaffected
Red HatAnsible Automation Platform Execution Environments2.17.6-2 < *unaffected
Red HatRed Hat Ansible Automation Platform 2.4 for RHEL 81:2.15.13-1.el8ap < *unaffected
Red HatRed Hat Ansible Automation Platform 2.4 for RHEL 91:2.15.13-1.el9ap < *unaffected
Red HatRed Hat Ansible Automation Platform 2.5 for RHEL 81:2.16.13-1.el8ap < *unaffected
Red HatRed Hat Ansible Automation Platform 2.5 for RHEL 91:2.16.13-1.el9ap < *unaffected
Red HatRed Hat OpenStack Platform 17.1 for RHEL 90:2.14.2-4.6.el9ost < *unaffected

Weaknesses

  • CWE-863: Incorrect Authorization

Workarounds

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

ADP Enrichment

CISA ADP Vulnrichment

  • SSVC:
  • Exploitation: none
    • Automatable: no
    • Technical Impact: total

CVE Program Container

Additional References

References