Bug 2370817 (CVE-2025-49521)

Summary: CVE-2025-49521 event-driven-ansible: Template Injection via Git Branch and Refspec in EDA Projects
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: bilwei, haoli, hkataria, jajackso, jcammara, jmitchel, jneedle, kegrant, koliveir, kshier, mabashia, mkanoor, pbraun, security-response-team, shvarugh, simaishi, smcdonal, stcannon, teagle, tfister, thavo, yguenane
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
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.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OSIDB Bzimport 2025-06-06 15:39:43 UTC
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.

Comment 2 errata-xmlrpc 2025-06-30 21:20:45 UTC
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