Skip to main content
Vulnerability Database/CVE-2026-84706

CVE-2026-84706: Ansible Automation Platform RCE Vulnerability

CVE-2026-84706 is a remote code execution flaw in Ansible Automation Platform that allows privileged users to inject malicious scripts via environment variables. This post explains its impact, affected versions, and mitigation steps.

Published:

CVE-2026-84706 Overview

A flaw in Red Hat Ansible Automation Platform's automation-controller allows privileged users to achieve arbitrary code execution inside execution-environment containers. The custom Credential Type environment-variable injector enforces a deny-list that blocks the ANSIBLE_* prefix and a fixed ENV_BLOCKLIST. That deny-list omits process-hijacking loader variables such as BASH_ENV, ENV, LD_PRELOAD, LD_LIBRARY_PATH, PYTHONSTARTUP, and GIT_SSH_COMMAND. When combined with the credential file injector, an attacker can drop a controlled script into the environment and point BASH_ENV at it. Any job attaching that credential type then executes the attacker's code.

Critical Impact

Privileged users can execute arbitrary code inside execution-environment containers of any job attaching a malicious Credential Type, breaking the trust boundary between credential authors and job runners.

Affected Products

  • Red Hat Ansible Automation Platform (automation-controller)
  • See Red Hat advisories for specific affected component versions
  • Deployments using custom Credential Types with environment-variable injectors

Discovery Timeline

  • 2026-09-23 - CVE-2026-84706 published to NVD
  • 2026-09-24 - Last updated in NVD database

Technical Details for CVE-2026-84706

Vulnerability Analysis

The vulnerability is an incomplete deny-list validation issue [CWE-184] in the custom Credential Type feature of automation-controller. Credential Types allow administrators to define environment variables and files that get injected into the execution environment when a credential of that type is attached to a job. To prevent abuse, the injector validates variable names against a deny-list combining an ANSIBLE_* prefix check and a static ENV_BLOCKLIST.

The deny-list is not exhaustive. It fails to enumerate loader and interpreter variables that shells and language runtimes evaluate before executing user code. Setting BASH_ENV to a script path causes non-interactive bash invocations to source that script before running the intended command. Similar behavior exists for ENV, PYTHONSTARTUP, LD_PRELOAD, LD_LIBRARY_PATH, and GIT_SSH_COMMAND.

Root Cause

The root cause is reliance on a deny-list rather than an allow-list for security-sensitive environment variables. The list omits well-known process-hijacking variables. Any variable capable of altering the loader, shell startup, or interpreter behavior should have been rejected but was not.

Attack Vector

An attacker requires privileged access to create or modify a custom Credential Type. The attacker crafts a Credential Type with a file injector that writes a shell script into the execution environment and an environment-variable injector that sets BASH_ENV to the script path. When any job runs with a credential of that type attached, bash sources the attacker-controlled script, yielding arbitrary code execution inside the execution-environment container. The scope changes from the credential author to the job runner, expanding blast radius across pipelines.

See the Red Hat CVE Analysis CVE-2026-84706 for authoritative technical details.

Stop Remote Code Execution Before It Runs

Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.

Stop Exploit Attempts

Detection Methods for CVE-2026-84706

Indicators of Compromise

  • Custom Credential Types defining environment variables named BASH_ENV, ENV, LD_PRELOAD, LD_LIBRARY_PATH, PYTHONSTARTUP, or GIT_SSH_COMMAND.
  • Credential Type file injectors writing executable shell scripts into paths later referenced by environment variables.
  • Unexpected child processes or outbound network connections spawned by automation-controller execution-environment containers during job runs.

Detection Strategies

  • Audit all custom Credential Type definitions in automation-controller for injector fields that reference loader or interpreter variables.
  • Compare execution-environment container process trees against expected Ansible playbook activity to identify injected pre-execution scripts.
  • Review automation-controller job event logs for credential attachments correlated with anomalous script execution or file writes.

Monitoring Recommendations

  • Enable audit logging for Credential Type create, update, and delete API calls, and forward events to a centralized log platform.
  • Monitor execution-environment containers for process launches originating from BASH_ENV-sourced scripts or unexpected preloaded libraries.
  • Alert on privilege changes granting users the ability to create or modify Credential Types.

How to Mitigate CVE-2026-84706

Immediate Actions Required

  • Apply the fixes referenced in Red Hat advisories RHSA-2026:71113, RHSA-2026:71114, RHSA-2026:71177, and RHSA-2026:71179.
  • Inventory existing custom Credential Types and remove any injector definitions that set process-hijacking environment variables.
  • Restrict Credential Type administration to a minimal set of trusted operators and require change review.

Patch Information

Red Hat has published fixed builds through the advisories listed above. Refer to the Red Hat CVE Analysis CVE-2026-84706 page and Red Hat Bug Report #2527187 for the authoritative list of fixed component versions and upgrade guidance for your Ansible Automation Platform deployment.

Workarounds

  • Prohibit creation of Credential Types with environment-variable injectors that set loader or shell startup variables until patches are applied.
  • Remove or disable custom Credential Types authored by non-administrator accounts pending review.
  • Restrict which service accounts can attach custom credentials to production jobs, favoring vendor-provided Credential Types where possible.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.