CVE-2023-5764 Ansible: template injection
An attacker can execute arbitrary code via template injection in Ansible by crafting malicious template data, affecting automation platform users.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2023-5764?
CVE-2023-5764 is a high-severity code injection vulnerability in Fedoraproject Extra Packages for Enterprise Linux, published on 12 Dec 2023. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
A template injection flaw was found in Ansible where a user's controller internal templating operations may remove the unsafe designation from template data. This issue could allow an attacker to use a specially crafted file to introduce templating injection when supplying templating data.
Weakness: CWE-1336
Which versions are affected by CVE-2023-5764?
7 open source packages ship an affected version, including ansible-core. It affects 6 products.
| Package | Affected | Fixed in |
|---|---|---|
ansible-core PyPI | All versions | 2.14.12, 2.15.8, 2.16.1 |
ansible-core PyPI | All versions | 2.14.12 |
ansible-core PyPI | All versions | 2.14.12 |
ansible-core PyPI | From 2.15.0 | 2.15.8 |
ansible-core PyPI | From 2.15.0 | 2.15.8 |
ansible-core PyPI | From 2.16.0 | 2.16.1 |
1 more packages
ansible-core PyPI | From 2.16.0 | 2.16.1 |
Linux distribution packages (1)
ansible-documentation openSUSE:Tumbleweed | All versions | 2.15.7-1.1 |
Products include Fedoraproject Extra Packages for Enterprise Linux, Fedoraproject Fedora, Redhat Ansible, Redhat Ansible Automation Platform, Redhat Ansible Developer, Redhat Ansible Inside.
How do I fix CVE-2023-5764?
Upgrade ansible-core to a fixed version for your release line: 2.14.12, 2.15.8 or 2.16.1.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2023-5764 being exploited?
There is no known exploitation of CVE-2023-5764 in the wild and no public exploit code.
Other vulnerabilities in Fedoraproject Extra Packages for Enterprise Linux
- CVE-2023-34152 Command injection in ImageMagick
- CVE-2022-4170 Code injection in rxvt-unicode
- CVE-2022-40315 Moodle Minor SQL injection risk in admin user browsing
- CVE-2022-45152 Moodle blind Server-Side Request Forgery (SSRF) vulnerability in LTI provider library
- CVE-2022-24882 Server side NTLM does not properly check parameters in FreeRDP
All Fedoraproject Extra Packages for Enterprise Linux vulnerabilities
Sources
Also known as AZL-32158, AZL-34538, CLSA-2024-1716272658, CLSA-2024-1716287930, CLSA-2024-1716485825, CLSA-2025-1761901881 and 10 more.