Bug 2503754 - CVE-2026-16493 ansible-core: argument injection in ansible-galaxy collection install via git clone (incomplete fix for CVE-2026-11332) [fedora-43]
Summary: CVE-2026-16493 ansible-core: argument injection in ansible-galaxy collection ...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: ansible-core
Version: 43
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact:
URL:
Whiteboard: {"flaws": ["a9221b0d-2da9-43f2-8b59-b...
Depends On:
Blocks: CVE-2026-16493
TreeView+ depends on / blocked
 
Reported: 2026-07-21 17:16 UTC by Borja Tarraso
Modified: 2026-07-21 17:16 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Borja Tarraso 2026-07-21 17:16:41 UTC
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.

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.


Note You need to log in before you can comment on or make changes to this bug.