VAITP Dataset

← Back to the dataset

CVE-2026-84706

Credential type injector bypass allows arbitrary code exec via BASH_ENV.

  • CVSS 7.6
  • CWE-184
  • Input Validation and Sanitization
  • Remote

A flaw was found in Ansible Automation Platform's automation-controller. The custom Credential Type environment-variable injector validates variable names against a deny-list (an ANSIBLE_* prefix check plus a fixed ENV_BLOCKLIST) that omits process-hijacking loader variables such as BASH_ENV, ENV, LD_PRELOAD, LD_LIBRARY_PATH, PYTHONSTARTUP and GIT_SSH_COMMAND. Combined with the credential file injector, a privileged user can write an attacker-controlled script into the execution environment and point BASH_ENV at it, obtaining arbitrary code execution inside the execution-environment container for any job that attaches a credential of that type.

CVSS base score
7.6
Published
2026-09-23
OWASP
A05 Security Misconfiguration
Orthogonal defect classification
Checking
Code defect classification
Missing Check
Category
Input Validation and Sanitization
Subcategory
Command Injection
Accessibility scope
Remote
Impact
Arbitrary Code Execution
Affected component
Ansible

Solution

Upgrade Ansible Automation Platform to version 2.3.2 (or later), which includes the fix that adds proper allow‑list validation for environment variables in custom Credential Types.

Vulnerable code sample

import os

ENV_BLOCKLIST = {"PATH", "HOME", "SHELL"}

def inject_credential_env(creds: dict, target_env: dict) -> dict:
    """
    Merge credential-provided environment variables into the target environment.
    The function is supposed to block dangerous loader variables.
    """
    for key, value in creds.items():
        # VULNERABLE: insufficient deny‑list, allows loader vars like BASH_ENV
        if key.startswith("ANSIBLE_") or key in ENV_BLOCKLIST:
            continue
        target_env[key] = value
    return target_env

Patched code sample

import os

ENV_BLOCKLIST = {"PATH", "HOME", "SHELL", "BASH_ENV", "ENV", "LD_PRELOAD",
                 "LD_LIBRARY_PATH", "PYTHONSTARTUP", "GIT_SSH_COMMAND"}

def inject_credential_env(creds: dict, target_env: dict) -> dict:
    """
    Merge credential-provided environment variables into the target environment.
    The function now blocks all known loader variables.
    """
    for key, value in creds.items():
        # FIX: expanded deny‑list includes loader variables
        if key.startswith("ANSIBLE_") or key in ENV_BLOCKLIST:
            continue
        target_env[key] = value
    return target_env

Cite this entry

@misc{vaitp:cve202684706,
  title        = {{Credential type injector bypass allows arbitrary code exec via BASH_ENV.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-84706},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-84706/}}
}

Download this entry as JSON Download the whole dataset

Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.