Fedora Account System
Red Hat Associate
Red Hat Customer
An argument injection vulnerability was found in ansible-core's collection install functionality. The _extract_collection_from_git() function in lib/ansible/galaxy/collection/concrete_artifact_manager.py constructs git clone commands without a '--' (end-of-options) separator before user-supplied values. This allows an attacker to craft a malicious collection source URI (e.g. 'git+-ccore.sshCommand=sh -c "malicious_command"') that, when processed by 'ansible-galaxy collection install', causes git to interpret attacker-controlled input as command-line flags rather than positional arguments. Through the -ccore.sshCommand technique, this achieves arbitrary command execution without requiring any special git transport configuration. This is an incomplete fix for CVE-2026-11332 (BZ#2485379, GHSA-w8p5-mx5w-cpqj). The CVE-2026-11332 fix added a '--' end-of-options separator to the ROLE install path in lib/ansible/utils/galaxy.py, but the analogous COLLECTION install path in lib/ansible/galaxy/collection/concrete_artifact_manager.py was not hardened. The collection install path uses the same pattern of passing user-controlled git URLs directly to subprocess.check_call() without the '--' guard. Source code verification confirmed the vulnerability is present on all active branches (devel, stable-2.18, stable-2.17) as of 2026-07-21. The parse_scm() function performs no security-relevant URL validation — no scheme check, no argument prefix check, no sanitization. Additionally, the git checkout command in the same function also lacks '--' before the user-supplied version value, providing a secondary injection point.