CVE-2026-16493 in Ansible Automation Platforminfo

Summary

by MITRE • 07/21/2026

A flaw was found in ansible-core. The _extract_collection_from_git() function in ansible-core's concrete_artifact_manager.py constructs git clone commands without a '--' (end-of-options) separator before user-supplied URLs when installing collections from git sources. An attacker who provides a crafted collection source URI containing git argument injection payloads can achieve arbitrary command execution when a user runs 'ansible-galaxy collection install' with the malicious source. This is an incomplete fix for CVE-2026-11332, which hardened the role install path but missed the equivalent collection install code path.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 07/21/2026

This vulnerability exists in ansible-core's handling of git repository cloning operations during collection installation processes. The flaw resides in the _extract_collection_from_git() function within concrete_artifact_manager.py where git clone commands are constructed without proper argument separation using the '--' end-of-options marker before user-supplied URLs. This omission creates a command injection opportunity that allows attackers to manipulate git command execution through carefully crafted collection source URIs.

The technical implementation of this vulnerability stems from insufficient input sanitization and improper command construction practices within ansible-core's artifact management system. When users execute 'ansible-galaxy collection install' with malicious source URIs, the function fails to properly separate git arguments from user-provided repository URLs, enabling attackers to inject additional git command options or arguments that get executed as part of the clone operation. This represents a classic command injection vulnerability where attacker-controlled input is directly incorporated into system commands without adequate validation or escaping mechanisms.

The operational impact of this vulnerability extends beyond simple privilege escalation scenarios to encompass full system compromise capabilities for any user who executes collection installation commands with untrusted sources. Attackers can leverage this flaw to execute arbitrary code on systems running ansible-core, potentially leading to complete system takeover, data exfiltration, or lateral movement within network environments where ansible is deployed. The vulnerability affects all versions of ansible-core that implement the affected collection installation functionality, making it particularly dangerous in enterprise environments where automated deployment and configuration management are common practices.

The security implications align with CWE-78 command injection and ATT&CK technique T1059 command and scripting interpreter, as this vulnerability enables attackers to execute arbitrary commands through the git cloning process. This represents an incomplete remediation of a similar issue (CVE-2026-11332) that previously addressed role installation paths but failed to apply equivalent protections to collection installation code paths. Organizations using ansible-core for automated infrastructure deployment, configuration management, or security orchestration are at significant risk if they allow untrusted users to provide collection source URIs or if their automation pipelines do not properly validate input sources before executing ansible-galaxy commands.

Mitigation strategies should focus on immediate patching of affected ansible-core versions and implementing strict input validation for all collection source URIs in automated deployment pipelines. Organizations should enforce the use of trusted repositories only, implement proper repository verification mechanisms, and consider deploying additional network controls to prevent unauthorized access to git repositories. System administrators should also review existing automation workflows to ensure that user-supplied inputs are properly sanitized before being processed by ansible-galaxy commands, and consider implementing principle of least privilege for users executing collection installation operations. Regular security assessments of configuration management tooling should include verification of proper argument separation in all external command execution contexts to prevent similar vulnerabilities from emerging in other components.

Responsible

Redhat

Reservation

07/21/2026

Disclosure

07/21/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Do you know our Splunk app?

Download it now for free!