Automation-controller: automation-controller: incomplete sanitize_jinja() regex allows jinja template injection into ad-hoc module_args, machine-credential fields, and host names, reaching ansible-core templating in the execution environment
What fixes it
No source in this snapshot names a fixed version. The vendor advisories under References are the place to check.
Description
A flaw was found in the automation-controller input-validation guard sanitize_jinja(). The function uses two regular expressions to reject user-supplied Jinja, but the patterns stop at the first interior '}' or '%' character, so a Jinja expression containing an inner brace (for example an empty dict) is accepted while remaining valid Jinja. Because sanitize_jinja() is the sole guard on several launch-time fields — ad-hoc command module_args, Machine-credential username / become_method / become_user, and inventory host names — a low-privileged user can inject Jinja that ansible-core evaluates in the execution environment. This enables execution of arbitrary commands in the execution environment (bypassing an administrator's AD_HOC_COMMANDS module allowlist) and disclosure of secrets belonging to credentials the attacker cannot read (by templating a co-attached credential's injected environment variables), across the credential access-control boundary.
Text from CVE List
Affected versions 5
- Red Hat Ansible Automation Platform 2.5 for RHEL 8unaffected: 0:4.6.33-1.el8ap and laterCVE List
- Red Hat Ansible Automation Platform 2.5 for RHEL 9unaffected: 0:4.6.33-1.el9ap and laterCVE List
- Red Hat Ansible Automation Platform 2.6 for RHEL 9unaffected: 0:4.7.17-1.el9ap and laterCVE List
- Red Hat Ansible Automation Platform 2.6unaffected: 1789673739 and laterCVE List
- Red Hat Ansible Automation Platform 2.7unaffected: 1789580684 and laterCVE List
References 6
- access.redhat.com/errata/RHSA-2026:71113Advisoryvia CVE List
- access.redhat.com/errata/RHSA-2026:71114Advisoryvia CVE List
- access.redhat.com/errata/RHSA-2026:71177Advisoryvia CVE List
- access.redhat.com/errata/RHSA-2026:71179Advisoryvia CVE List
- access.redhat.com/security/cve/CVE-2026-84714Advisoryvia CVE List
- bugzilla.redhat.com/show_bug.cgi?id=2527198Referencevia CVE List