CVE-2023-5764: Ansible: template injection
A flaw was found in Ansible, where a user's controller is vulnerable to template injection when internal templating operations may errantly remove the unsafe designation from template data.
Other sources
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.
— Launchpad
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pip/ansible-coreto a version that resolves this vulnerability.Fixed in 2.14.12 - Upgrade
Upgrade
pip/ansible-coreto a version that resolves this vulnerability.Fixed in 2.15.8 - Upgrade
Upgrade
pip/ansible-coreto a version that resolves this vulnerability.Fixed in 2.16.1 - Upgrade
Upgrade
debian/ansibleto a version that resolves this vulnerability.Fixed in 5.4.0-1 - Upgrade
Upgrade
debian/ansible-coreto a version that resolves this vulnerability.Fixed in 2.14.16-0+deb12u1 - Upgrade
Upgrade
debian/ansible-coreto a version that resolves this vulnerability.Fixed in 2.14.13-1 - Upgrade
Upgrade
debian/ansibleto a version that resolves this vulnerability.Fixed in 7.7.0+dfsg-3+deb12u1Fixed in 12.0.0+dfsg-0+deb13u1Fixed in 14.0.0+dfsg-1Fixed in 14.4.0+dfsg-1 - Upgrade
Upgrade
debian/ansible-coreto a version that resolves this vulnerability.Fixed in 2.14.18-0+deb12u2Fixed in 2.19.11-0+deb13u1Fixed in 2.22.0~beta2-1
Event History
Frequently Asked Questions
What is the severity of CVE-2023-5764?
The severity of CVE-2023-5764 is categorized as medium due to the potential for template injection.
How do I fix CVE-2023-5764?
To fix CVE-2023-5764, upgrade to Ansible version 2.10.8 or later, or an appropriate patched version as listed in the remediation guide.
Which versions are affected by CVE-2023-5764?
CVE-2023-5764 affects several versions of Ansible, specifically those prior to 2.10.8 and certain versions of Ansible-Core.
What is template injection in the context of CVE-2023-5764?
Template injection in CVE-2023-5764 refers to a flaw whereby unsafe template data could be executed, leading to potential unauthorized actions.
Are all distributions of Ansible affected by CVE-2023-5764?
No, not all distributions of Ansible are affected; the vulnerability primarily impacts specific versions from Debian, Red Hat, and Fedora.