Ansible Arbitrary Code Execution
High severity
GitHub Reviewed
Published
May 14, 2022
to the GitHub Advisory Database
•
Updated Sep 3, 2024
Description
Published by the National Vulnerability Database
Jun 8, 2017
Published to the GitHub Advisory Database
May 14, 2022
Reviewed
Aug 16, 2023
Last updated
Sep 3, 2024
User module in ansible before 1.6.6 is vulnerable to command execution. Ansible can get the result of remote command in variable, which may come from untrusted source of input. If the content of variable isn't properly filtered and when attempting to use the variable, it will trigger a function that passes it through jinja 2 template engine that can result into arbitrary command execution. Under certain circumstances, unprivileged user on system that is being managed via ansible can execute code on the managing host under UID of running ansible process.
References