Vulnerability · Published Jun 16, 2026 · Assigned by redhat
CVE-2026-12398Galaxy_ng: shell injection in legacy role import via unsanitized git ref names
High 7.5
In plain English
A high-severity OS command injection in Red Hat Ansible Automation Platform 2 from Red Hat. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.9% (higher than 60% of all known vulnerabilities).
Official description
A command injection vulnerability was found in galaxy_ng. The do_git_checkout() function in the legacy role import API (v1) interpolates unsanitized git ref names (branch/tag names) into shell commands executed via subprocess.run() with shell=True. An authenticated user who controls a git repository can create a branch or tag with shell metacharacters in the name to achieve remote code execution on the pulp worker. The vulnerable endpoint is only reachable when GALAXY_ENABLE_LEGACY_ROLES is set to True, which is not the default configuration.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | galaxy-ng | no fix listed | GHSA-6hw7-j4jw-wpff |
| PyPI | galaxy-ng | no fix listed | PYSEC-2026-2486 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Red Hat | Red Hat Ansible Automation Platform 2 | see references |
| Red Hat | Red Hat Ansible Automation Platform 2 | see references |
| Red Hat | Red Hat Ansible Automation Platform 2 | see references |
| Red Hat | Red Hat Ansible Automation Platform 2 | see references |
| Red Hat | Red Hat Ansible Automation Platform 2 | see references |
| Red Hat | Red Hat Ansible Automation Platform 2 | see references |
| Red Hat | Red Hat Ansible Automation Platform 2 | see references |
| Red Hat | Red Hat Ansible Automation Platform 2 | see references |
| Red Hat | Red Hat Ansible Automation Platform 2 | see references |
Weakness: CWE-78 · Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
References
- https://access.redhat.com/security/cve/CVE-2026-12398 vdb-entry, x_refsource_REDHAT
- RHBZ#2489180 issue-tracking, x_refsource_REDHAT