Cloudanix VulnDB

CVE-2023-5764

High · 7.8

CVSS

7.8

EPSS

0.5%

Published

Dec 12, 2023

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A bug in Ansible's automation tools could let someone with access to the system run hidden commands or steal information by tricking the software's template processing.

Exploitation
Local Privilege
Attacker needs
Low Privilege
Complexity
Low
Impact
Full Compromise
Component
Application
Class
Improper Input Validation
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The flaw allows internal templating operations in Ansible to strip the unsafe designation from user-supplied template data, enabling template injection that can execute arbitrary code or access sensitive data on the controller.

Why it matters to the business

Attackers could gain control over automation workflows, leading to unauthorized execution of tasks, exposure of credentials or secrets, and potential compromise of managed infrastructure with high operational disruption.

How an attack unfolds

An attacker with local access supplies a specially crafted file containing template data to the Ansible controller; the internal templating logic removes the unsafe marker, allowing the injected template to be processed and executed during controller operations.

How to fix it

Upgrade ansible/ansible to the fixed commit 1acaaadd0bcb416237410050dfd1ab1eeaabc046 or later release that restores proper unsafe designation handling for template data.

How to confirm the fix worked

Confirm the installed Ansible version includes commit 1acaaadd0bcb416237410050dfd1ab1eeaabc046; test templating operations with known unsafe data patterns to verify designation is preserved.

Typical attack path

  1. Obtain local access or ability to supply templating data to the Ansible controller
  2. Prepare and submit a malicious file designed to trigger unsafe template handling
  3. Trigger internal templating operations that process the supplied data
  4. Execute injected template content to achieve code execution or data exfiltration

How to detect it

Review Ansible controller logs for templating operations involving user-supplied files; look for unexpected variable expansions, command executions, or changes in privilege context during template rendering.

What your security team should do

  • Apply the fixed commit 1acaaadd0bcb416237410050dfd1ab1eeaabc046 immediately on all controller instances
  • Audit playbooks and templates for any custom unsafe data handling that could be affected
  • Monitor for unexpected template execution or elevated privileges during automation runs
  • Restrict local access to the controller to only trusted users until patched

The record

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.

Affected packages

Ecosystem Package Introduced Fixed
PyPI ansible-core 0 2.14.12
PyPI ansible-core 2.15.0 2.15.8
PyPI ansible-core 2.16.0 2.16.1
Debian:11 ansible 0 No fix
Debian:12 ansible 0 5.4.0-1
Debian:12 ansible-core 0 2.14.16-0+deb12u1
Debian:13 ansible 0 5.4.0-1
Debian:13 ansible-core 0 2.14.13-1
Red Hat:ansible_automation_platform:2.4::el8 ansible-core 0 1:2.15.8-1.el8ap
Red Hat:ansible_automation_platform:2.4::el8 python39-galaxy-importer 0 0:0.4.18-1.el8ap
Red Hat:ansible_automation_platform:2.4::el8 python3x-galaxy-importer 0 0:0.4.18-1.el8ap
Red Hat:ansible_automation_platform:2.4::el9 ansible-core 0 1:2.15.8-1.el9ap
Red Hat:ansible_automation_platform:2.4::el9 python-galaxy-importer 0 0:0.4.18-1.el9ap
Red Hat:ansible_automation_platform:2.4::el9 python3-galaxy-importer 0 0:0.4.18-1.el9ap
Red Hat:ansible_automation_platform_developer:2.4::el8 ansible-core 0 1:2.15.8-1.el8ap
Red Hat:ansible_automation_platform_developer:2.4::el9 ansible-core 0 1:2.15.8-1.el9ap
Red Hat:ansible_automation_platform_inside:2.4::el8 ansible-core 0 1:2.15.8-1.el8ap
Red Hat:ansible_automation_platform_inside:2.4::el9 ansible-core 0 1:2.15.8-1.el9ap
SUSE:Linux Enterprise Module for Package Hub 15 SP5 golang-github-prometheus-promu 0 0.14.0-150000.3.18.2
SUSE:Manager Client Tools 15 POS_Image-Graphical7 0 0.1.1710765237.46af599-150000.1.21.2
SUSE:Manager Client Tools 15 POS_Image-JeOS7 0 0.1.1710765237.46af599-150000.1.21.2
SUSE:Manager Client Tools 15 ansible 0 2.9.27-150000.1.17.2
SUSE:Manager Client Tools 15 dracut-saltboot 0 0.1.1710765237.46af599-150000.1.53.2
SUSE:Manager Client Tools 15 grafana 0 9.5.18-150000.1.63.2
SUSE:Manager Client Tools 15 mgr-daemon 0 4.3.9-150000.1.47.2
SUSE:Manager Client Tools 15 spacecmd 0 4.3.27-150000.3.116.2
SUSE:Manager Client Tools 15 spacewalk-client-tools 0 4.3.19-150000.3.89.2
SUSE:Manager Client Tools 15 spacewalk-koan 0 4.3.6-150000.3.33.2
SUSE:Manager Client Tools 15 uyuni-common-libs 0 4.3.10-150000.1.39.2
SUSE:Manager Client Tools 15 uyuni-proxy-systemd-services 0 4.3.12-150000.1.21.2
SUSE:Manager Client Tools 15-BETA POS_Image-Graphical7 0 0.1.1710765237.46af599-159000.3.24.2
SUSE:Manager Client Tools 15-BETA POS_Image-JeOS7 0 0.1.1710765237.46af599-159000.3.24.2
SUSE:Manager Client Tools 15-BETA ansible 0 2.9.27-159000.3.12.2
SUSE:Manager Client Tools 15-BETA dracut-saltboot 0 0.1.1710765237.46af599-159000.3.33.2
SUSE:Manager Client Tools 15-BETA grafana 0 9.5.16-159000.4.30.2
SUSE:Manager Client Tools 15-BETA spacecmd 0 5.0.5-159000.6.48.2
SUSE:Manager Client Tools 15-BETA spacewalk-client-tools 0 5.0.4-159000.6.54.2
SUSE:Manager Client Tools 15-BETA supportutils-plugin-susemanager-client 0 5.0.3-159000.6.21.2
SUSE:Manager Client Tools 15-BETA uyuni-tools 0 0.1.7-159000.3.8.1
SUSE:Manager Client Tools Beta for SLE Micro 5 golang-github-prometheus-node_exporter 0 1.5.0-159000.6.2.1
SUSE:Manager Client Tools Beta for SLE Micro 5 uyuni-tools 0 0.1.7-159000.3.8.1
SUSE:Manager Client Tools for SLE Micro 5 dracut-saltboot 0 0.1.1710765237.46af599-150000.1.53.2
SUSE:Manager Client Tools for SLE Micro 5 uyuni-proxy-systemd-services 0 4.3.12-150000.1.21.2
SUSE:Manager Proxy Module 4.3 ansible 0 2.9.27-150000.1.17.2
SUSE:Manager Proxy Module 4.3 uyuni-proxy-systemd-services 0 4.3.12-150000.1.21.2
SUSE:Manager Tools 15 POS_Image-Graphical7 0 0.1.1710765237.46af599-150000.1.21.2
SUSE:Manager Tools 15 POS_Image-JeOS7 0 0.1.1710765237.46af599-150000.1.21.2
SUSE:Manager Tools 15 ansible 0 2.9.27-150000.1.17.2
SUSE:Manager Tools 15 dracut-saltboot 0 0.1.1710765237.46af599-150000.1.53.2
SUSE:Manager Tools 15 grafana 0 9.5.18-150000.1.63.2
SUSE:Manager Tools 15 mgr-daemon 0 4.3.9-150000.1.47.2
SUSE:Manager Tools 15 spacecmd 0 4.3.27-150000.3.116.2
SUSE:Manager Tools 15 spacewalk-client-tools 0 4.3.19-150000.3.89.2
SUSE:Manager Tools 15 spacewalk-koan 0 4.3.6-150000.3.33.2
SUSE:Manager Tools 15 uyuni-common-libs 0 4.3.10-150000.1.39.2
SUSE:Manager Tools 15 uyuni-proxy-systemd-services 0 4.3.12-150000.1.21.2
SUSE:Manager Tools 15-BETA POS_Image-Graphical7 0 0.1.1710765237.46af599-159000.3.24.2
SUSE:Manager Tools 15-BETA POS_Image-JeOS7 0 0.1.1710765237.46af599-159000.3.24.2
SUSE:Manager Tools 15-BETA ansible 0 2.9.27-159000.3.12.2
SUSE:Manager Tools 15-BETA dracut-saltboot 0 0.1.1710765237.46af599-159000.3.33.2
SUSE:Manager Tools 15-BETA grafana 0 9.5.16-159000.4.30.2
SUSE:Manager Tools 15-BETA spacecmd 0 5.0.5-159000.6.48.2
SUSE:Manager Tools 15-BETA spacewalk-client-tools 0 5.0.4-159000.6.54.2
SUSE:Manager Tools 15-BETA supportutils-plugin-susemanager-client 0 5.0.3-159000.6.21.2
SUSE:Manager Tools 15-BETA uyuni-tools 0 0.1.7-159000.3.8.1
SUSE:Manager Tools Beta for SLE Micro 5 golang-github-prometheus-node_exporter 0 1.5.0-159000.6.2.1
SUSE:Manager Tools Beta for SLE Micro 5 uyuni-tools 0 0.1.7-159000.3.8.1
SUSE:Manager Tools for SLE Micro 5 dracut-saltboot 0 0.1.1710765237.46af599-150000.1.53.2
SUSE:Manager Tools for SLE Micro 5 uyuni-proxy-systemd-services 0 4.3.12-150000.1.21.2
Ubuntu:20.04:LTS ansible 0 No fix
Ubuntu:22.04:LTS ansible 0 No fix
Ubuntu:22.04:LTS ansible-core 0 No fix
Ubuntu:24.04:LTS ansible-core 0 No fix
Ubuntu:24.10 ansible-core 0 No fix
Ubuntu:25.04 ansible-core 0 No fix
Ubuntu:25.10 ansible-core 0 No fix
Ubuntu:Pro:16.04:LTS ansible 0 2.0.0.2-2ubuntu1.3+esm2
Ubuntu:Pro:18.04:LTS ansible 0 2.5.1+dfsg-1ubuntu0.1+esm2
Ubuntu:Pro:20.04:LTS ansible 0 2.9.6+dfsg-1ubuntu0.1~esm2
Ubuntu:Pro:22.04:LTS ansible 0 2.10.7+merged+base+2.10.8+dfsg-1ubuntu0.1~esm4
openSUSE:Leap 15.5 POS_Image-Graphical7 0 0.1.1710765237.46af599-150000.1.21.2
openSUSE:Leap 15.5 POS_Image-JeOS7 0 0.1.1710765237.46af599-150000.1.21.2
openSUSE:Leap 15.5 ansible 0 2.9.27-150000.1.17.2
openSUSE:Leap 15.5 dracut-saltboot 0 0.1.1710765237.46af599-150000.1.53.2
openSUSE:Leap 15.5 golang-github-prometheus-promu 0 0.14.0-150000.3.18.2
openSUSE:Leap 15.5 spacecmd 0 4.3.27-150000.3.116.2
openSUSE:Tumbleweed ansible-core 0 2.16.9-1.1
openSUSE:Tumbleweed ansible-core-2.17 0 2.17.6-1.1
openSUSE:Tumbleweed ansible-core-2.18 0 2.18.10-2.1
openSUSE:Tumbleweed ansible-core-2.19 0 2.19.4-1.1
openSUSE:Tumbleweed ansible-core-2.20 0 2.20.6-1.1
openSUSE:Tumbleweed ansible-documentation 0 2.15.7-1.1
pypi ansible 2.15.0 No fix
pypi ansible 2.16.0 No fix
pypi ansible-core 2.15.0 No fix
pypi ansible-core 2.16.0 No fix

Related vulnerabilities