Ansible: template injection
Key facts
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 2 fixed, 1 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-1336.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Red Hat | Red Hat Ansible Automation Platform 2.4 for RHEL 8 | — | 1:2.15.8-1.el8ap | Patch available | CNA |
| Red Hat | Red Hat Ansible Automation Platform 2.4 for RHEL 8 | — | 1:2.15.8-1.el8ap | Patch available | CNA |
| Red Hat | Red Hat Ansible Automation Platform 2.4 for RHEL 8 | — | 1:2.15.8-1.el8ap | Patch available | CNA |
| Red Hat | Red Hat Ansible Automation Platform 2.4 for RHEL 9 | — | 1:2.15.8-1.el9ap | Patch available | CNA |
| Red Hat | Red Hat Ansible Automation Platform 2.4 for RHEL 9 | — | 1:2.15.8-1.el9ap | Patch available | CNA |
| Red Hat | Red Hat Ansible Automation Platform 2.4 for RHEL 9 | — | 1:2.15.8-1.el9ap | Patch available | CNA |
| Red Hat | Red Hat Ansible Automation Platform 1.2 | — | — | No fix listed | CNA |
| — | ansible-core (PyPI) | 2.16.0 to before 2.16.1 | 2.16.1 | Patch available | GHSA-7j69-qfc3-2fq9 |
| — | ansible-core (PyPI) | 2.15.0 to before 2.15.8 | 2.15.8 | Patch available | GHSA-7j69-qfc3-2fq9 |
| — | ansible-core (PyPI) | before 2.14.12 | 2.14.12 | Patch available | GHSA-7j69-qfc3-2fq9 |
- Red Hat Ansible Automation Platform 2.4 for RHEL 8 VendorRed Hat Affected — Fixed in 1:2.15.8-1.el8ap Patch available CNA
- Red Hat Ansible Automation Platform 2.4 for RHEL 8 VendorRed Hat Affected — Fixed in 1:2.15.8-1.el8ap Patch available CNA
- Red Hat Ansible Automation Platform 2.4 for RHEL 8 VendorRed Hat Affected — Fixed in 1:2.15.8-1.el8ap Patch available CNA
- Red Hat Ansible Automation Platform 2.4 for RHEL 9 VendorRed Hat Affected — Fixed in 1:2.15.8-1.el9ap Patch available CNA
- Red Hat Ansible Automation Platform 2.4 for RHEL 9 VendorRed Hat Affected — Fixed in 1:2.15.8-1.el9ap Patch available CNA
- Red Hat Ansible Automation Platform 2.4 for RHEL 9 VendorRed Hat Affected — Fixed in 1:2.15.8-1.el9ap Patch available CNA
- Red Hat Ansible Automation Platform 1.2 VendorRed Hat Affected — Fixed in — No fix listed CNA
- ansible-core (PyPI) Vendor— Affected 2.16.0 to before 2.16.1 Fixed in 2.16.1 Patch available GHSA-7j69-qfc3-2fq9
- ansible-core (PyPI) Vendor— Affected 2.15.0 to before 2.15.8 Fixed in 2.15.8 Patch available GHSA-7j69-qfc3-2fq9
- ansible-core (PyPI) Vendor— Affected before 2.14.12 Fixed in 2.14.12 Patch available GHSA-7j69-qfc3-2fq9
CPE configurations NVD · 13
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:redhat:ansible:*:*:*:*:*:*:*:* | before 2.14.12; 2.15.0 to before 2.15.7 | Vulnerable | Red Hat |
| cpe:2.3:a:redhat:ansible:2.16.0:-:*:*:*:*:*:* | 2.16.0 | Vulnerable | Red Hat |
| cpe:2.3:a:redhat:ansible:2.16.0:beta1:*:*:*:*:*:* | 2.16.0 beta1 | Vulnerable | Red Hat |
| cpe:2.3:a:redhat:ansible:2.16.0:beta2:*:*:*:*:*:* | 2.16.0 beta2 | Vulnerable | Red Hat |
| cpe:2.3:a:redhat:ansible:2.16.0:rc1:*:*:*:*:*:* | 2.16.0 rc1 | Vulnerable | Red Hat |
| cpe:2.3:a:fedoraproject:extra_packages_for_enterprise_linux:8.0:*:*:*:*:*:*:* | 8.0 | Vulnerable | Fedoraproject |
| cpe:2.3:o:fedoraproject:fedora:38:*:*:*:*:*:*:* | 38 | Vulnerable | Fedoraproject |
| cpe:2.3:o:fedoraproject:fedora:39:*:*:*:*:*:*:* | 39 | Vulnerable | Fedoraproject |
| cpe:2.3:a:redhat:ansible_automation_platform:2.4:*:*:*:*:*:*:* | 2.4 | Vulnerable | Red Hat |
| cpe:2.3:a:redhat:ansible_developer:1.1:*:*:*:*:*:*:* | 1.1 | Vulnerable | Red Hat |
- cpe:2.3:a:redhat:ansible:*:*:*:*:*:*:*:* Versions before 2.14.12; 2.15.0 to before 2.15.7 Vulnerable ·Red Hat
- cpe:2.3:a:redhat:ansible:2.16.0:-:*:*:*:*:*:* Versions 2.16.0 Vulnerable ·Red Hat
- cpe:2.3:a:redhat:ansible:2.16.0:beta1:*:*:*:*:*:* Versions 2.16.0 beta1 Vulnerable ·Red Hat
- cpe:2.3:a:redhat:ansible:2.16.0:beta2:*:*:*:*:*:* Versions 2.16.0 beta2 Vulnerable ·Red Hat
- cpe:2.3:a:redhat:ansible:2.16.0:rc1:*:*:*:*:*:* Versions 2.16.0 rc1 Vulnerable ·Red Hat
- cpe:2.3:a:fedoraproject:extra_packages_for_enterprise_linux:8.0:*:*:*:*:*:*:* Versions 8.0 Vulnerable ·Fedoraproject
- cpe:2.3:o:fedoraproject:fedora:38:*:*:*:*:*:*:* Versions 38 Vulnerable ·Fedoraproject
- cpe:2.3:o:fedoraproject:fedora:39:*:*:*:*:*:*:* Versions 39 Vulnerable ·Fedoraproject
- cpe:2.3:a:redhat:ansible_automation_platform:2.4:*:*:*:*:*:*:* Versions 2.4 Vulnerable ·Red Hat
- cpe:2.3:a:redhat:ansible_developer:1.1:*:*:*:*:*:*:* Versions 1.1 Vulnerable ·Red Hat
Remediation
- Fix · GHSA-7j69-qfc3-2fq9 ansible-core (PyPI) Fixed in 2.16.1 Advisory →
- Fix · GHSA-7j69-qfc3-2fq9 ansible-core (PyPI) Fixed in 2.15.8 Advisory →
- Fix · GHSA-7j69-qfc3-2fq9 ansible-core (PyPI) Fixed in 2.14.12 Advisory →
Red Hat 1 advisory
- RHSA-2023:7773 Released 2023-12-13 · Red Hat rating ModerateRed Hat Ansible Automation Platform 2.4 Product Security and Bug Fix Update
- Red Hat Ansible Automation Platform 2.4 for RHEL 8 ansible-core-1:2.15.8-1.el8ap, python39-galaxy-importer-0.4.18-1.el8ap, python3x-galaxy-importer-0.4.18-1.el8ap
- Red Hat Ansible Automation Platform 2.4 for RHEL 9 ansible-core-1:2.15.8-1.el9ap, python-galaxy-importer-0.4.18-1.el9ap, python3-galaxy-importer-0.4.18-1.el9ap
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Ansible Automation Platform 1.2 | Affected | No fix yet |
| Red Hat Ansible Automation Platform 2.4 for RHEL 8 | Fixed | RHSA-2023:7773 |
| Red Hat Ansible Automation Platform 2.4 for RHEL 9 | Fixed | RHSA-2023:7773 |
Not affected: 2 products
- Red Hat Ansible Automation Platform 2.4 for RHEL 8
- Red Hat Ansible Automation Platform 2.4 for RHEL 9
Timeline
- 2026-10-02 Threatist record created from CVE-2023-5764
- 2026-10-03 Alias added: GHSA-7j69-qfc3-2fq9
- 2026-11-05 Affected versions changed · CNA
- 2026-11-05 Affected versions changed · Red Hat
References
Patch 1
Advisory 3
Other 5
- https://github.com/ansible/ansible/commit/270b39f6ff02511a2199505161218cbd1a5ae34f
- https://github.com/ansible/ansible/commit/7239d2d371bc6e274cbb7314e01431adce6ae25a
- https://github.com/ansible/ansible/commit/fea130480d261ea5bf6fcd5cf19a348f1686ceb1
- https://github.com/ansible/ansible
- https://lists.fedoraproject.org/archives/list/[email protected]/message/X7Q6CHPVCHMZS5M7V22GOKFSXZAQ24EU
More Red Hat Ansible vulnerabilities
- TI-2016-07808 Improper input validation in Ansible CVSS 3.1HIGH 8.1
- TI-2014-03853 Injection in Ansible CVSS 3.1CRITICAL 9.8
- TI-2014-03839 The safe_eval function in Ansible before 1.5.4 does not properly restrict the code… CVSS 3.1CRITICAL 9.8
- TI-2017-05191 Sensitive information in log files in Red Hat ansible CVSS 3.1CRITICAL 9.8
- TI-2014-04077 Multiple argument injection vulnerabilities in Ansible before 1.6.7 allow remote… CVSS 3.1CRITICAL 9.8
- TI-2014-04076 Ansible before 1.6.7 does not prevent inventory data with "{{" and "lookup" substrings… CVSS 3.1CRITICAL 9.8
Sources
- CVE-2023-5764 · CVE Program
- CVE-2023-5764 · NVD
- FIRST EPSS
- GHSA-7j69-qfc3-2fq9 · GitHub Advisory Database · CC BY 4.0
- CVE-2023-5764 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences