REDHAT-BUG-2503724: High severity ansible-core vulnerability

Published Jul 21, 2026
·
Updated

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.

Affected Software

1 affected component
ansible-core=

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade ansible-core to a version that resolves this vulnerability.

    Patch BZ#2485379
  2. Configuration

    Ensure the ROLE install git command uses the '--' end-of-options separator before any user-supplied value (as described in the CVE-2026-11332 fix).

    ansible-core (lib/ansible/utils/galaxy.py) ROLE install path add '--' end-of-options separator to git invocation in ROLE install path = --

Event History

Jul 21, 2026
Data Sourced
via Red Hat·04:35 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of REDHAT-BUG-2503724?

The severity of REDHAT-BUG-2503724 is categorized as high with a CVSS score of 7.

2

How do I fix REDHAT-BUG-2503724?

To fix REDHAT-BUG-2503724, ensure you update to the latest patched version of ansible-core.

3

What type of vulnerability is REDHAT-BUG-2503724?

REHAT-BUG-2503724 is an argument injection vulnerability affecting the collection install functionality in ansible-core.

4

What component of ansible-core is affected by REDHAT-BUG-2503724?

The _extract_collection_from_git() function in lib/ansible/galaxy/collection/concrete_artifact_manager.py is the affected component.

5

What are the potential impacts of REDHAT-BUG-2503724?

The vulnerability may allow an attacker to inject arbitrary commands into git clone operations, leading to potential code execution.

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