Ansible-core: argument injection in ansible-galaxy collection install via git clone (incomplete fix for cve-2026-11332)
Summary
| CVE | CVE-2026-16493 |
|---|---|
| State | PUBLISHED |
| Assigner | redhat |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-07-21 18:16:57 UTC |
| Updated | 2026-07-22 15:16:53 UTC |
| Description | 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. |
Risk And Classification
Primary CVSS: v3.1 7.8 HIGH from [email protected]
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS: 0.003160000 probability, percentile 0.238320000 (date 2026-07-22)
Problem Types: CWE-88 | CWE-88 Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Secondary | 7.8 | HIGH | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| 3.1 | CNA | CVSS | 7.8 | HIGH | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
CVSS v3.1 Breakdown
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Red Hat | Red Hat Ansible Automation Platform 2 | Not specified | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 10 | Not specified | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 8 | Not specified | Not specified |
| CNA | Red Hat | Red Hat Enterprise Linux 9 | Not specified | Not specified |
| CNA | Red Hat | Red Hat Satellite 6 | Not specified | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| access.redhat.com/security/cve/CVE-2026-16493 | [email protected] | access.redhat.com | |
| bugzilla.redhat.com/show_bug.cgi | [email protected] | bugzilla.redhat.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
Vendor Comments And Credit
Discovery Credit
CNA: Red Hat would like to thank Ta Duc Thien (NTCS) for reporting this issue. (en)
Additional Advisory Data
| Source | Time | Event |
|---|---|---|
| CNA | 2026-07-21T11:19:29.854Z | Reported to Red Hat. |
| CNA | 2026-07-21T16:32:48.105Z | Made public. |
Workarounds
CNA: The following practices would help for avoiding exposure and mitigate this flaw: 1. Do not install Ansible collections from untrusted or unverified git sources. Only install collections from trusted sources such as Ansible Galaxy (https://galaxy.ansible.com), Red Hat Automation Hub (https://console.redhat.com/ansible/automation-hub), or verified internal repositories using HTTPS URLs. 2. Carefully inspect any requirements.yml files before running 'ansible-galaxy collection install -r requirements.yml'. Verify that all collection sources use legitimate HTTPS URLs and do not contain git+ prefixed URIs with suspicious characters (especially values starting with '-'). 3. Ensure your system's git version is 2.12 or later, which disables the ext:: transport by default. While this does not fully prevent exploitation (the -ccore.sshCommand technique bypasses transport restrictions), it eliminates one of the exploitation vectors. 4. Restrict the GIT_ALLOW_PROTOCOL environment variable to only necessary protocols (e.g. https, ssh) and never include 'ext' unless absolutely required.