A flaw was found in the EDA component of the Ansible Automation Platform, where user-supplied Git branch or refspec values are evaluated as Jinja2 templates. This vulnerability allows authenticated users to inject expressions that execute commands or access sensitive files on the EDA worker. In OpenShift, it can lead to service account token theft.
Template Injection vulnerability in the Git metadata fields (branch, tag, commit, refspec) of the EDA project creation process in the Ansible Automation Platform. The flaw occurs because user inputs are directly passed to Ansible Jinja2 templates and evaluated without proper sanitization. An attacker can inject expressions such as {{ lookup('file', '/etc/passwd') }} or {{ lookup('lines','id') }} that are executed during project synchronization. This results in arbitrary command execution and file disclosure on the EDA worker. In OpenShift environments, the attacker can retrieve the service account token used by the worker pod and escalate access within the cluster.
This issue has been addressed in the following products:
Red Hat Ansible Automation Platform 2.5 for RHEL 8
Red Hat Ansible Automation Platform 2.5 for RHEL 9
Via RHSA-2025:9986 https://access.redhat.com/errata/RHSA-2025:9986
Template Injection vulnerability in the Git metadata fields (branch, tag, commit, refspec) of the EDA project creation process in the Ansible Automation Platform. The flaw occurs because user inputs are directly passed to Ansible Jinja2 templates and evaluated without proper sanitization. An attacker can inject expressions such as {{ lookup('file', '/etc/passwd') }} or {{ lookup('lines','id') }} that are executed during project synchronization. This results in arbitrary command execution and file disclosure on the EDA worker. In OpenShift environments, the attacker can retrieve the service account token used by the worker pod and escalate access within the cluster.