CVE-2026-11332: Ansible-core: argument injection in ansible-galaxy role install leads to arbitrary code execution

Published Jun 5, 2026
·
Updated

A flaw was found in ansible-core. The ansible-galaxy role install command processes dependency specifications from a role's meta/requirements.yml file. Due to improper neutralization of argument delimiters, a malicious role author can inject arbitrary git configuration flags through the src field. This allows arbitrary code execution on the machine of a user who installs the role via ansible-galaxy role install.

Other sources

A flaw was found in ansible-core's ansible-galaxy command. When installing a role, ansible-galaxy processes a meta/requirements.yml file that lists role dependencies. The src and name fields from this file are passed as arguments to git clone via Python's Popen without a -- separator to delimit options from positional arguments. A malicious role author can craft a dependency entry where the src field contains a git configuration flag (e.g., -ccore.sshCommand=sh -c "maliciouscommand") and the name field provides a valid repository URL. This results in arbitrary code execution on the system of any user who installs the role. The fix is to insert -- before the positional arguments in the git clone command list.

— Red Hat

Ansible-core: argument injection in ansible-galaxy role install leads to arbitrary code execution

— Microsoft

Affected Software

11 affected componentsFixes available
pypi/ansible-core
Microsoft azl3 ansible 2.17.11-1<2.17.11-2
2.17.11-2
debian/ansible
7.7.0+dfsg-3+deb12u112.0.0+dfsg-0+deb13u114.0.0+dfsg-114.4.0+dfsg-1
debian/ansible-core<=2.14.18-0+deb12u2
2.19.11-0+deb13u12.22.0~beta2-1
debian/ansible<5.4.0-1
5.4.0-1
debian/ansible<5.4.0-1
5.4.0-1
debian/ansible<5.4.0-1
5.4.0-1
debian/ansible-core*
debian/ansible-core<2.19.11-0+deb13u1
2.19.11-0+deb13u1
debian/ansible-core<2.21.1~rc1-1
2.21.1~rc1-1
IBM Concert Software<=1.0-3.0.1.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 2.17.11-2
  2. Upgrade

    Upgrade debian/ansible to a version that resolves this vulnerability.

    Fixed in 5.4.0-1
  3. Upgrade

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

    Fixed in 2.19.11-0+deb13u1
  4. Upgrade

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

    Fixed in 2.21.1~rc1-1
  5. Upgrade

    Upgrade debian/ansible to a version that resolves this vulnerability.

    Fixed in 7.7.0+dfsg-3+deb12u1Fixed in 12.0.0+dfsg-0+deb13u1Fixed in 14.0.0+dfsg-1Fixed in 14.4.0+dfsg-1
  6. Upgrade

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

    Fixed in 2.19.11-0+deb13u1Fixed in 2.22.0~beta2-1
  7. Configuration

    Update ansible-galaxy role install behavior so that when building the git clone command list, it inserts the "--" separator before the positional arguments; this prevents src from injecting git configuration flags (e.g., via meta/requirements.yml src).

    ansible-galaxy (ansible-core) / git clone invoked by role install git clone argument list (add -- separator) = -- inserted before positional arguments

Event History

Jun 5, 2026
Data Sourced
via Red Hat·07:28 AM
DescriptionSeverityAffected Software
CVE Published
via MITRE·08:21 AM
Data Sourced
via MITRE·08:21 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:16 AM
DescriptionSeverityWeakness
Data Sourced
via OSV·09:16 AM
DescriptionSeverityAffected Software
Jun 7, 2026
Data Sourced
via Microsoft·08:01 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·08:01 AM
Affected Software
Oct 29, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is the severity of CVE-2026-11332?

CVE-2026-11332 has a high severity rating of 7.8.

2

How do I fix CVE-2026-11332?

To fix CVE-2026-11332, upgrade to the latest version of ansible-core where the vulnerability is patched.

3

What type of vulnerability is CVE-2026-11332?

CVE-2026-11332 is an argument injection vulnerability that allows arbitrary code execution.

4

What software is affected by CVE-2026-11332?

CVE-2026-11332 affects the pypi/ansible-core package.

5

What can an attacker do with CVE-2026-11332?

An attacker can exploit CVE-2026-11332 to inject arbitrary git configuration flags and execute malicious code.

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