CVE-2026-16493: Ansible-core: argument injection in ansible-galaxy collection install via git clone (incomplete fix for cve-2026-11332)

Published Jul 21, 2026
·
Updated

A flaw was found in ansible-core. The extractcollectionfromgit() function in ansible-core's concreteartifactmanager.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.

Other sources

An argument injection vulnerability was found in ansible-core's collection install functionality. The extractcollectionfromgit() function in lib/ansible/galaxy/collection/concreteartifactmanager.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 "maliciouscommand"') 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/concreteartifactmanager.py was not hardened. The collection install path uses the same pattern of passing user-controlled git URLs directly to subprocess.checkcall() 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 parsescm() 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.

Red Hat

Affected Software

1 affected component
Ansible ansible-core=undefined

Event History

Jul 21, 2026
Data Sourced
via Red Hat·04:35 PM
DescriptionSeverityAffected Software
CVE Published
via MITRE·05:26 PM
Data Sourced
via MITRE·05:26 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:16 PM
DescriptionSeverityWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-16493?

CVE-2026-16493 has a severity rating of high, with a score of 7.8.

2

How do I fix CVE-2026-16493?

To mitigate CVE-2026-16493, ensure you update ansible-core to the latest version where this vulnerability has been addressed.

3

What is CVE-2026-16493 about?

CVE-2026-16493 describes an argument injection vulnerability in ansible-galaxy related to insecure git clone commands.

4

Who is affected by CVE-2026-16493?

Any user of ansible-core who installs collections from git sources using vulnerable versions is at risk due to CVE-2026-16493.

5

Is there a workaround for CVE-2026-16493?

The recommended approach is to update to a patched version of ansible-core, as there are no reliable workarounds available for CVE-2026-16493.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203