Ansible is widely used to automate server configuration, application deployment, infrastructure management, and repetitive IT operations. Its agentless architecture makes it convenient to manage multiple systems through SSH or other remote connection methods.
However, the same capabilities that make Ansible powerful also make its control node an important security target.
An Ansible control node may have access to SSH private keys, cloud credentials, automation secrets, privileged accounts, and configuration files for hundreds or thousands of managed systems. If an attacker compromises the control node or executes malicious code through an automation workflow, the impact can extend beyond a single machine.
Ansible Galaxy and third-party roles and collections introduce another security consideration. These components can contain executable tasks, modules, plugins, and dependencies. Installing untrusted content can expose the system to malicious code and vulnerabilities in the installation process itself.
Several Ansible Core vulnerabilities disclosed in 2026 highlight these risks. They include path traversal, argument injection, and symbolic-link path escape vulnerabilities involving the ansible-galaxy installation process.
This guide examines five relevant Ansible CVEs, explains their potential impact, and provides practical steps to check your environment and reduce security exposure.
Key Takeaways
Several 2026 Ansible vulnerabilities affect the installation of roles and collections through ansible-galaxy.
Malicious roles, collections, dependency files, and Git sources can expose an Ansible control node to security risks.
Some vulnerabilities can allow unauthorized file creation, file replacement, or arbitrary code execution.
Installing content from trusted sources, reviewing dependencies, and restricting installation privileges can reduce exposure.
Ansible users should check vendor security advisories rather than relying exclusively on upstream version numbers.
1. What Is Ansible and How Does It Work?
Ansible is an open-source automation platform used to configure systems, deploy applications, manage infrastructure, and execute administrative tasks.
It generally uses a control node to communicate with managed hosts. Administrators define automation instructions in YAML-based playbooks, while Ansible executes the required tasks.
Understanding its main components helps explain where the security risks discussed in this article occur.
Ansible Core
Ansible Core is the primary automation engine. It provides commands such as:
ansible
ansible-playbook
ansible-galaxy
It also includes modules, plugins, and other functionality required to execute automation workflows.
The CVEs discussed in this article primarily concern ansible-core, particularly the ansible-galaxy installation functionality.
Ansible Galaxy
Ansible Galaxy is a platform for discovering and sharing reusable Ansible roles and collections.
The ansible-galaxy command can install content from Galaxy, private repositories, local archives, directories, and Git sources.
Although reusable content saves development time, organizations should review its origin and dependencies before installation.
Ansible Automation Platform
Ansible Automation Platform (AAP) is Red Hat's commercial automation solution. It adds enterprise capabilities such as centralized automation management, access controls, credential management, and execution environments.
Because it includes Ansible Core components, vulnerabilities affecting those components may also affect particular AAP releases. However, affected and fixed status must be checked against the specific product advisory.
Playbooks, Roles, and Collections
Ansible uses several types of automation content:
Playbooks: YAML files that describe the tasks Ansible should execute.
Roles: Reusable collections of tasks, variables, templates, and handlers.
Collections: Packages containing roles, modules, plugins, and related automation content.
Requirements files: Files that identify roles or collections and their dependencies.
These components make automation easier to maintain, but untrusted content can introduce security risks.
2. Latest Ansible Security Vulnerabilities and CVEs in 2026
The following five CVEs highlight security weaknesses in Ansible Core's role and collection installation processes.
They do not all have the same exploitation requirements. Some involve malicious installation metadata, while others involve crafted Git sources or collection archives.
CVE-2026-130644: Collection Installation Path Traversal
Vulnerability type: Path traversal
Affected component: Ansible Core collection installer
Red Hat severity: Moderate
CVSS v3 score: 8.1
What Is Vulnerability?
CVE-2026-130644 is a path traversal vulnerability involving the command:
ansible-galaxy collection install
The installer derives the collection's destination directory from the namespace and name fields inside the collection's metadata.
The security problem occurs because those metadata values are not adequately validated to ensure that the resulting installation path remains inside the configured collections directory.
A malicious collection can use a specially crafted name to direct installation outside the intended location.
How Can It Be Exploited?
An attacker may distribute a malicious collection through a local archive, remote URL, source directory, Git repository, or dependency.
If a user or automated process installs that collection, the crafted metadata can influence where the installer writes files.
According to Red Hat, the installer may also remove an existing directory at the unintended destination if it is writable by the user running the command.
Potential Security Impact
Successful exploitation may allow an attacker to:
Write attacker-controlled files outside the intended collection directory.
Delete an existing writable directory.
Replace files or directories accessible to the installing account.
Modify files that may influence later automation or application execution.
The impact depends on the permissions of the account running the installation.
Mitigation and Recommended Actions
Red Hat recommends installing collections only from trusted sources.
Before installing a collection:
Review its MANIFEST.json or galaxy.yml metadata.
Check the namespace and collection name for path separators, .. sequences, or absolute paths.
Review dependencies before allowing automatic installation.
Avoid untrusted repositories, archives, and mirrors.
Run installation processes with restricted permissions.
Check the official Red Hat CVE-2026-130644 advisory for affected products and updated remediation information.
CVE-2026-105929: Role Installation Path Traversal
Vulnerability type: Path traversal
Affected component: Ansible Galaxy role installer
Red Hat severity: Important
CVSS v3 score: 8.1
What Is Vulnerability?
CVE-2026-105929 affects the Ansible role installation process.
The vulnerability occurs because the installer uses a role's name to construct its installation path without adequately validating that the destination remains inside the selected roles directory.
A specially crafted role name containing directory traversal sequences such as ../ can escape the intended installation location. An absolute path can also replace the expected destination.
How Can It Be Exploited?
An attacker can publish a malicious role containing a crafted dependency in its meta/requirements.yml file.
When an administrator installs that role, Ansible may process its dependencies and use the attacker-controlled role name to construct an unintended filesystem path.
The vulnerability does not require the attacker to have direct access to the target server. However, a user or automated process must install attacker-influenced content.
Potential Security Impact
Depending on the installing user's permissions, exploitation may allow:
Unauthorized files to be written outside the roles directory.
Existing files or directories to be replaced.
An existing role directory outside the intended path to be removed and replaced when --force is used.
Changes to files that could affect subsequent automation tasks.
The impact is limited by the filesystem permissions of the account running the installation.
How to Reduce the Risk
Organizations should:
Review meta/requirements.yml before installing third-party roles.
Inspect transitive dependencies, not just the main role.
Reject role names containing suspicious path sequences or absolute paths.
Avoid using --force with untrusted content.
Install roles through restricted accounts and isolated environments.
Read the Red Hat CVE-2026-105929 advisory for the latest product-specific information.
CVE-2026-11332: Argument Injection in Role Installation
Vulnerability type: Argument injection
Affected component: Git-based Ansible role dependency installation
Red Hat CVSS v3 score: 7.8
Severity: High
What Is the Vulnerability?
CVE-2026-11332 affects how ansible-galaxy role install processes dependencies specified in a role's meta/requirements.yml file.
The issue involves improper handling of argument delimiters in the src field.
A malicious role author can craft a dependency specification that injects additional Git configuration arguments into the installation process.
This can cause Git to perform unintended operations and potentially execute attacker-controlled commands.
How Can It Be Exploited?
An attacker can create a malicious role or dependency specification and distribute it to an organization.
If an administrator or automated pipeline installs that content using ansible-galaxy role install, the crafted arguments may influence the Git command executed during installation.
The attacker therefore needs the victim or an automated process to install the malicious role or dependency.
Potential Security Impact
Successful exploitation can result in arbitrary code execution on the machine running the Ansible installation command.
Depending on the account's privileges, an attacker may gain access to:
Local files and configuration.
Automation credentials.
Environment variables.
SSH keys accessible to the process.
Other resources available to the installing user.
A compromised control node can create additional risks for managed infrastructure.
Mitigation and Fixes
The vulnerability was addressed through changes to how Git arguments are passed during role installation.
Red Hat also published product-specific security errata. For example, the CVE record identifies fixed Ansible Automation Platform builds, including certain releases based on ansible-core 2.16.19.
Do not assume that one upstream version number applies to every distribution or AAP release.
Recommended actions:
Apply the security update provided by your vendor.
Review role dependencies before installation.
Avoid installing roles from unknown Git repositories.
Use isolated installation environments.
Restrict access to the control node and its credentials.
See the Red Hat CVE-2026-11332 advisory for affected products and fixes.
CVE-2026-16493: Git Argument Injection in Collection Installation
Vulnerability type: Git argument injection
Affected component: Ansible Core collection installer
Red Hat severity: Important
CVSS v3 score: 7.8
What Is the Vulnerability?
CVE-2026-16493 is an argument injection vulnerability affecting collection installation from Git sources.
It is related to CVE-2026-11332, which addressed a similar issue in role installation.
However, the earlier security fix did not apply the same protection to the collection installation code path.
As a result, the collection installer could still construct Git commands without the required -- end-of-options separator before processing user-supplied source values.
How Can It Be Exploited?
An attacker can create a specially crafted collection source URI containing Git argument injection payloads.
If an administrator installs the collection using ansible-galaxy collection install, the malicious input may be interpreted as Git command options rather than only as a source location.
The advisory also identifies an additional argument-handling issue involving the Git checkout operation.
Potential Security Impact
Successful exploitation can allow arbitrary command execution on the machine performing the collection installation.
Possible consequences include:
Unauthorized command execution.
Access to local automation files.
Exposure of credentials accessible to the installing account.
Modification of local files.
Compromise of the Ansible control environment.
Mitigation and Recommended Actions
Red Hat recommends avoiding untrusted or unverified Git sources for collection installation.
Organizations should:
Prefer Ansible Galaxy, Automation Hub, or verified internal repositories.
Use HTTPS sources from trusted providers.
Inspect requirements.yml files before installation.
Pay particular attention to Git-based source values beginning with suspicious option-like characters.
Keep Git updated.
Restrict allowed Git protocols where practical.
Apply vendor security updates when available.
Using HTTPS sources from trusted repositories reduces exposure to this specific Git-source issue, but it does not eliminate every Ansible installation risk.
Read the Red Hat CVE-2026-16493 advisory for technical details and mitigation guidance.
CVE-2026-89091: Collection Installation Symlink Path Escape
Vulnerability type: Symbolic-link path escape
Affected component: Ansible Galaxy collection archive extractor
CVSS v3 score: 8.8
SUSE severity: Important
What Is the Vulnerability?
CVE-2026-89091 affects the archive extraction process used by:
ansible-galaxy collection install
The vulnerability occurs because the extractor validates archive member paths using lexical path normalization rather than fully resolving symbolic links.
It also fails to perform the required containment check on symbolic-link directory entries before creating them.
A specially crafted collection archive can therefore manipulate the extraction process to write files outside the intended destination directory.
How Can It Be Exploited?
An attacker prepares a malicious collection archive containing carefully arranged symbolic-link directory entries.
When an administrator installs the collection, the archive can create a chain of symbolic links that redirects a subsequent file extraction outside the expected collection directory.
The victim must install the malicious collection for the attack to succeed.
Potential Security Impact
The vulnerability may allow an attacker to:
Overwrite files outside the intended installation directory.
Modify files accessible to the installing account.
Change files used by applications or automation workflows.
Execute code through files modified on the Ansible control node.
The potential impact depends on the privileges of the account running the installation.
This vulnerability also represents a bypass of the earlier fix for CVE-2020-10691.
Mitigation and Recommended Actions
Organizations should:
Avoid installing collections from untrusted archives.
Use verified collection sources.
Apply the relevant security updates for their operating system or Ansible distribution.
Run collection installation processes with restricted filesystem permissions.
Use isolated environments for third-party collection installation.
Review collection dependencies and archive provenance.
Fixed-package availability varies by distribution and release. Some SUSE streams have published updates, while other distribution trackers have continued to list affected packages.
Check the SUSE CVE-2026-89091 advisory and your own vendor's security tracker before deciding whether your installation is protected.
3. Summary of the Five Ansible CVEs
The following table provides a quick comparison of the five vulnerabilities discussed in this guide.
CVE | Vulnerability Type | Affected Area | Security Impact |
CVE-2026-130644 | Path traversal | Collection installation | Unauthorized directory deletion and file writes |
CVE-2026-105929 | Path traversal | Role installation | Files written outside the intended roles directory |
CVE-2026-11332 | Argument injection | Role dependencies | Potential arbitrary code execution |
CVE-2026-16493 | Git argument injection | Collection installation | Potential arbitrary command execution |
CVE-2026-89091 | Symlink path escape | Collection archive extraction | Unauthorized file overwrite and potential code execution |
Important: These vulnerabilities have different affected products, exploitation conditions, and patch availability. A single Ansible Core version number should not be treated as proof that all five issues are fixed.
4. Common Ansible Security Risks Beyond CVEs
Known CVEs are only one part of Ansible security. Organizations should also understand the wider risks associated with automation content, credentials, permissions, and configuration.
Malicious Roles and Collections
Ansible roles and collections can contain executable tasks, modules, and plugins.
Installing content from an unknown author or repository can introduce malicious instructions into an otherwise trusted automation environment.
Before installation, review the publisher, source repository, dependencies, and recent changes.
Untrusted Galaxy Dependencies
A role or collection may depend on other third-party components.
These transitive dependencies can introduce security problems even when the main package appears trustworthy.
Review dependency files and pin versions where appropriate.
Exposed Automation Credentials
Ansible control nodes may contain credentials for remote systems, cloud platforms, databases, and deployment environments.
Storing passwords directly in playbooks, inventories, or source repositories can expose sensitive information.
Use Ansible Vault or a suitable external secrets manager, and avoid logging sensitive values.
Excessive Privileges
Running every automation task with root privileges increases the impact of mistakes and successful attacks.
Use privilege escalation only when necessary, and give automation accounts the minimum permissions required.
Insecure Playbook Configurations
Poorly configured playbooks can introduce security weaknesses.
Examples include:
Disabling SSH host-key verification without a justified reason.
Setting validate_certs: false.
Downloading files without integrity verification.
Passing unsanitized variables to shell commands.
Creating files with unnecessarily broad permissions.
Exposing passwords in task output.
Review these configurations regularly.
Software Supply-Chain Attacks
Automation systems rely on external packages, roles, collections, and repositories.
Compromised maintainer accounts, malicious packages, typosquatted namespaces, and unverified dependencies can introduce attacker-controlled content.
Organizations should establish a process for reviewing and approving third-party automation dependencies.
5. How to Check Your Ansible Version for Vulnerabilities
Checking your Ansible installation is an important first step in vulnerability management.
However, checking the version alone is not sufficient. Operating-system vendors may backport security patches without changing the upstream version number.
Use the following steps to understand your installation.
Step 1: Check the Ansible Version
Run:
ansible --version
This displays the Ansible version, Python information, configuration file location, and related environment details.
Pay attention to the reported ansible-core version.
Step 2: Identify How Ansible Was Installed
For a Python package installation:
pip show ansible-core
For RPM-based distributions:
rpm -q ansible-core
For Debian-based distributions:
dpkg -l ansible-core
This helps identify the installed package and its version.
Step 3: List Installed Roles and Collections
To list installed collections:
ansible-galaxy collection list
To list installed roles:
ansible-galaxy role list
Review the output and identify components installed from third-party sources.
Step 4: Review Dependency Files
Search your repositories for:
requirements.yml
meta/requirements.yml
galaxy.yml
Git-based collection sources
Private Galaxy server configurations
Pay particular attention to unverified Git URLs, suspicious role names, and dependencies that are not pinned to reviewed versions.
Step 5: Check Official Vendor Advisories
Use the relevant security tracker for your environment:
Compare your installed package with the affected and fixed package information for your exact distribution and release.
Step 6: Check Execution Environment Images
If you use Ansible Automation Platform or container-based execution environments, inspect the Ansible Core package inside the image.
The host operating system's Ansible version may not match the version used by the automation execution environment.
6. How to Fix and Mitigate Ansible Vulnerabilities
After identifying potentially affected components, organizations should prioritize remediation based on the vendor's security advisory and the importance of the affected environment.
Update Ansible Core
Install security updates through the package manager or supported update channel for your environment.
For example, on a Debian-based system:
sudo apt update
sudo apt upgrade ansible-core
On an RPM-based system:
sudo dnf update ansible-core
For Python-based installations, use a supported and tested package update process rather than blindly upgrading production systems.
Before updating:
Confirm the supported release.
Review compatibility requirements.
Test the update in a staging environment.
Verify that the updated package contains the relevant security fix.
Review Official Security Advisories
Monitor security advisories from Ansible and your operating-system vendor.
A vulnerability may be fixed in one distribution while remaining unresolved in another.
Do not assume that an upstream release number or a third-party scanner result alone establishes the security status of a vendor-maintained package.
Use Trusted Galaxy Collections
Install roles and collections from trusted sources.
Prefer official Galaxy repositories, Red Hat Automation Hub, or verified internal repositories.
Avoid installing unknown archives, Git repositories, and third-party packages without reviewing their contents and dependencies.
Inspect Role and Collection Dependencies
Review dependency specifications before installation.
Check:
Role names and collection identifiers.
Git source URLs.
Dependency versions.
Repository ownership.
Changes between releases.
Transitive dependencies.
Pinning reviewed versions can help prevent unexpected changes in automation dependencies.
Restrict Automation Permissions
Do not run third-party content installation as root unless it is strictly necessary.
Use a dedicated, unprivileged account and an isolated container or CI runner for installation and validation.
This limits the files and resources that an attacker can affect if a malicious package exploits an installation vulnerability.
Secure Credentials and Secrets
Use Ansible Vault or an external secrets manager to protect sensitive information.
Also:
Set no_log: true on tasks that handle sensitive values.
Avoid committing secrets to Git repositories.
Rotate credentials when exposure is suspected.
Restrict access to SSH keys and cloud credentials.
Separate credentials between development, staging, and production.
7. Ansible Security Best Practices
A consistent security process is more effective than reacting to vulnerabilities only after they become known.
The following practices can help organizations improve their Ansible security posture.
Apply the Principle of Least Privilege
Use become only for tasks that require elevated permissions.
Avoid giving automation accounts unrestricted sudo access when narrower permissions are sufficient.
Review Automation Changes Through Source Control
Keep playbooks, roles, and dependency files in version control.
Require code reviews for changes to automation scripts, credentials, inventory files, and third-party dependencies.
Separate Credentials by Environment
Do not reuse production credentials across development and testing environments.
Use separate credentials and access permissions to reduce the impact of a compromised environment.
Audit Playbooks and Inventories
Use tools such as ansible-lint to identify potentially unsafe patterns and maintain consistent playbook quality.
Review inventory files for exposed credentials and unnecessary access.
Monitor Security Advisories
Assign responsibility for monitoring Ansible and operating-system security updates.
Establish a regular process for reviewing new vulnerabilities, applying patches, and documenting remediation.
Isolate Third-Party Installation Processes
Use disposable or restricted environments to inspect and install third-party roles and collections.
This is particularly important when working with Git sources, external archives, or dependencies that have not been reviewed previously.
8. Ansible Security Tools and Vulnerability Scanning
Security tools can help identify weaknesses in Ansible environments, dependencies, container images, and automation repositories.
Here are some useful options.
Tool | Main Purpose |
ansible-lint | Identifies playbook quality and potentially unsafe patterns |
pip-audit | Checks Python package dependencies against known vulnerabilities |
Dependabot | Identifies vulnerable dependencies and suggests updates |
GitLab Dependency Scanning | Detects known vulnerabilities in supported project dependencies |
Trivy | Scans container images and supported software dependencies |
Grype | Identifies vulnerabilities in container images and software packages |
Gitleaks | Detects exposed secrets in source repositories |
TruffleHog | Searches repositories and other sources for exposed credentials |
These tools serve different purposes. For example, ansible-lint is not a replacement for a CVE scanner, and a secret scanner does not establish whether an Ansible Core package contains a security fix.
Use multiple security controls where appropriate.
Collection signature verification can also help establish content provenance. However, signature verification does not prevent every installer vulnerability, as demonstrated by CVE-2026-130644.
9. Ansible vs. Other Configuration Management Tools: Security Considerations
Ansible is one of several tools used for infrastructure automation and configuration management.
Other platforms use different architectures and security models.
Tool | Automation Model | Security Considerations |
Ansible | Agentless, generally push-based | Control-node security, SSH credentials, and third-party content installation |
Puppet | Agent-based with a central server | Agent security, certificate management, and server access controls |
Chef | Agent-based configuration management | Cookbook supply-chain security and credential protection |
Salt | Master/minion architecture | Master security, authentication, and communication controls |
Terraform | Declarative infrastructure provisioning | State-file protection, cloud credentials, and provider dependencies |
Terraform is not a direct replacement for configuration management tools such as Ansible. Its primary focus is infrastructure provisioning and management.
No automation platform is completely secure by default. Organizations should evaluate the security requirements of their environments, control access to automation systems, protect credentials, and regularly review dependencies.
10. Frequently Asked Questions About Ansible Vulnerabilities
Are Ansible vulnerabilities remotely exploitable?
The five vulnerabilities covered in this article involve installing attacker-influenced roles or collections rather than attacking a conventional listening service.
However, automated CI/CD pipelines can install dependencies without direct human involvement. This means a malicious dependency may reach a control node through an automated workflow.
Is Ansible Galaxy safe to use?
Ansible Galaxy is a useful platform for discovering and sharing automation content, but users should still review publishers, dependencies, and collection contents.
Using a well-known platform does not guarantee that every package or dependency is free from security risks.
Is collection signature verification enough to protect Ansible?
No. Signature verification can help establish content authenticity and provenance, but it does not prevent every vulnerability in the installation process.
CVE-2026-130644 demonstrates why organizations need additional controls, including metadata validation, trusted sources, patching, and restricted installation permissions.
How do I check whether my Ansible installation is vulnerable?
Start by running:
ansible --version
Then identify how Ansible was installed, list installed roles and collections, and compare your package against the security advisories published by your operating-system vendor.
Remember that distribution maintainers may backport fixes without changing the upstream version number.
Which Ansible versions are affected by the 2026 CVEs?
Affected and fixed versions vary by CVE, Ansible Core release, operating system, and Ansible Automation Platform product.
Check the individual CVE records and vendor security advisories instead of relying on a single universal version number.
What is the fastest way to reduce Ansible security risks?
Start with these actions:
Stop installing roles and collections from untrusted sources.
Review existing requirements.yml files and dependencies.
Apply available vendor security updates.
Run installation processes with restricted permissions.
Protect SSH keys, cloud credentials, and other automation secrets.
Where can I report an Ansible security vulnerability?
You can review the Ansible project's security policy for reporting instructions. For vulnerabilities affecting Red Hat products, consult Red Hat Product Security.
Conclusion: Make Ansible Security Part of Your Automation Process
Ansible helps organizations manage infrastructure efficiently, but its powerful automation capabilities also create important security responsibilities.
The 2026 vulnerabilities discussed in this guide demonstrate how weaknesses in role installation, collection extraction, dependency handling, and Git argument processing can expose an Ansible control node to unauthorized file operations or code execution.
Organizations should not rely on version checks alone. They need to review vendor security advisories, install verified automation content, restrict installation privileges, protect credentials, and regularly audit playbooks and dependencies.
A proactive vulnerability management process helps reduce the likelihood that a compromised automation dependency will become an infrastructure-wide security incident.
Need help improving your organization's security posture?
Softiconex helps businesses strengthen their digital security through practical security assessment, vulnerability identification, and technical guidance. Contact our team at info@softiconex.com to discuss your cybersecurity requirements.
