CVE-2026-84714
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.
Statement
A template injection flaw was found in the automation-controller component of Red Hat Ansible Automation Platform, rated IMPORTANT by Red Hat Product Security. The controller relies on a single input-validation helper, sanitize_jinja(), to reject user-supplied Jinja in fields that are later handed to ansible-core for templating, but the helper's two regular expressions use negated character classes that stop at the first interior '}' or '%' character. As a result, a Jinja expression containing an inner brace (for example an empty dict) is accepted while remaining fully valid Jinja. Because sanitize_jinja() is the sole guard on several launch-time fields — the module arguments of ad-hoc commands, the username and privilege-escalation fields of Machine credentials, and inventory host names — a low-privileged authenticated user can inject Jinja that ansible-core evaluates in the execution environment. This enables execution of arbitrary commands in the execution environment (for example via a lookup('pipe', ...) expression embedded in an allowlisted non-executing ad-hoc module such as ping, bypassing an administrator's AD_HOC_COMMANDS module allowlist) and disclosure of secrets belonging to credentials the attacker cannot read (by placing a lookup('env', ...) expression in an attacker-managed credential field so that a co-attached credential's secret is injected into the execution environment's process environment, templated, and surfaced in job output), crossing the credential access-control boundary. All affected Red Hat Ansible Automation Platform streams are marked affected; a fix is being pursued for the 2.5, 2.6, and 2.7 streams, while the 2.4 stream has been marked wontfix. Red Hat and CVE.org assign the same severity to this flaw (CVSS 3.1 score 7.1, IMPORTANT).
Mitigation
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.
Common Vulnerability Scoring System (CVSS) Score Details
Info alert:Important note
CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).
CVSS v3 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 7.1 | N/A | 7.1 |
| Attack Vector | Network | N/A | Network |
| Attack Complexity | Low | N/A | Low |
| Privileges Required | Low | N/A | Low |
| User Interaction | None | N/A | None |
| Scope | Unchanged | N/A | Unchanged |
| Confidentiality | High | N/A | High |
| Integrity Impact | Low | N/A | Low |
| Availability Impact | None | N/A | None |
Vector
Red Hat: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N
cve.org: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N
Understanding the Weakness (CWE)
Access Control
Technical Impact: Bypass Protection Mechanism
Attackers may be able to find other malicious inputs that were not expected by the developer, allowing them to bypass the intended protection mechanism.
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.