CVE-2023-5764: Ansible: template injection

Published Nov 2, 2023
·
Updated

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

29 affected componentsFixes available
pip/ansible-core<2.14.12
2.14.12
pip/ansible-core>=2.15.0<2.15.8
2.15.8
pip/ansible-core>=2.16.0<2.16.1
2.16.1
IBM Edge Application Manager<=4.5
Microsoft azl3 ansible 2.17.0-1
Microsoft cbl2 ansible 2.14.12-2
Microsoft azl3 ansible 2.15.3-1
redhat ansible<2.14.12
redhat ansible>=2.15.0<2.15.7
redhat ansible=2.16.0
redhat ansible=2.16.0-beta1
redhat ansible=2.16.0-beta2
redhat ansible=2.16.0-rc1
Fedoraproject Extra Packages For Enterprise Linux=8.0
Fedoraproject Fedora=38
Fedoraproject Fedora=39
All of the following
Any of the following
redhat Ansible Automation Platform=2.4
redhat Ansible Developer=1.1
redhat Ansible Inside=1.2
Any of the following
redhat Enterprise Linux=8.0
redhat Enterprise Linux=9.0
debian/ansible<5.4.0-1
5.4.0-1
debian/ansible<5.4.0-1
5.4.0-1
debian/ansible<5.4.0-1
5.4.0-1
debian/ansible-core<2.14.16-0+deb12u1
2.14.16-0+deb12u1
debian/ansible-core<2.14.13-1
2.14.13-1
debian/ansible-core<2.14.13-1
2.14.13-1
debian/ansible
7.7.0+dfsg-3+deb12u112.0.0+dfsg-0+deb13u114.0.0+dfsg-114.4.0+dfsg-1
debian/ansible-core
2.14.18-0+deb12u22.19.11-0+deb13u12.22.0~beta2-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/ansible-core to a version that resolves this vulnerability.

    Fixed in 2.14.12
  2. Upgrade

    Upgrade pip/ansible-core to a version that resolves this vulnerability.

    Fixed in 2.15.8
  3. Upgrade

    Upgrade pip/ansible-core to a version that resolves this vulnerability.

    Fixed in 2.16.1
  4. Upgrade

    Upgrade debian/ansible to a version that resolves this vulnerability.

    Fixed in 5.4.0-1
  5. Upgrade

    Upgrade debian/ansible-core to a version that resolves this vulnerability.

    Fixed in 2.14.16-0+deb12u1
  6. Upgrade

    Upgrade debian/ansible-core to a version that resolves this vulnerability.

    Fixed in 2.14.13-1
  7. Upgrade

    Upgrade debian/ansible to 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
  8. Upgrade

    Upgrade debian/ansible-core to 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

Nov 2, 2023
Data Sourced
via Red Hat·12:57 PM
DescriptionSeverityAffected Software
Dec 12, 2023
CVE Published
via MITRE·10:01 PM
Data Sourced
via MITRE·10:01 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Dec 13, 2023
Advisory Published
via GitHub·12:30 AM
Dec 21, 2023
Data Sourced
via Microsoft·08:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·08:00 AM
Affected Software
Aug 20, 2025
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software
Nov 6, 2026
Data Sourced
via OSV·09:47 AM
Affected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

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.

2

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.

3

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.

4

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.

5

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203