Code Injection, Race Condition, and Execution with Unnecessary Privileges in Ansible
Red Hat Ansible
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| ansible PyPI |
|
|
Red Hat Ansible
| Product | Affected | Fixed in |
|---|---|---|
| ansible PyPI |
|
|
2.9.72.8.92.9.6A flaw was found in Ansible Engine, all versions 2.7.x, 2.8.x and 2.9.x prior to 2.7.17, 2.8.9 and 2.9.6 respectively, when using ansible_facts as a subkey of itself and promoting it to a variable when inject is enabled, overwriting the ansible_facts after the clean. An attacker could take advantage of this by altering the ansible_facts, such as ansible_hosts, users and any other key data which would lead into privilege escalation or code injection.
From the CVE record · redhat
Ansible Engine is vulnerable when ansible_facts is used as a subkey of itself and promoted to a variable with inject enabled. An attacker who can alter ansible_facts could change host, user, or other key data, potentially causing privilege escalation or code injection. The input does not specify whether network access, authentication, or user interaction is required.
Teams running Red Hat Ansible Engine 2.7.x before 2.7.17, 2.8.x before 2.8.9, or 2.9.x before 2.9.6, including affected PyPI ansible packages, should check their installations.