First published: Sat Oct 12 2024(Updated: )
The ansible-core `user` module contains an exploitable flaw that 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. Requirements to exploit (if any) - Someone with root privileges must use the `user` module with the`generate_ssh_key` option (disabled by default) and targeting an unprivileged user. - Access to the same unprivileged user on a system managed by the above automation.
Affected Software | Affected Version | How to fix |
---|---|---|
Ansible |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
The severity of REDHAT-BUG-2318271 is classified as high due to its potential to allow unprivileged users to manipulate system files.
To fix REDHAT-BUG-2318271, update the ansible-core to the latest version recommended by Red Hat.
All users of the ansible-core user module are affected by REDHAT-BUG-2318271, especially those executing it in unprivileged directories.
The potential impacts of REDHAT-BUG-2318271 include unauthorized file modifications and escalated ownership for sensitive files.
A possible workaround for REDHAT-BUG-2318271 is to restrict the execution of the user module in untrusted directories until a patch is applied.