CVE-2026-12398 Details
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.
A command injection vulnerability exists in galaxy_ng's legacy role import API (v1). The issue arises in the do_git_checkout() function, which interpolates unsanitized git reference names (branch or tag names) into shell commands. These commands are executed using subprocess.run() with shell=True, allowing for remote code execution on the pulp worker. This vulnerability can be exploited by an authenticated user who controls a git repository, by creating a branch or tag with shell metacharacters in the name. The vulnerable endpoint is only accessible when GALAXY_ENABLE_LEGACY_ROLES is set to True, which is not the default configuration in Red Hat Ansible Automation Platform versions 2.4, 2.5, and 2.6.
Users should ensure that GALAXY_ENABLE_LEGACY_ROLES is set to False, the default setting in Red Hat Ansible Automation Platform. If legacy role support must be enabled, access to the Galaxy/Hub API should be restricted to trusted users only. Additionally, monitoring import activity for suspicious git references containing shell metacharacters can help detect potential exploitation.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jun 16, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://access.redhat.com/security/cve/CVE-2026-12398 | [email protected] | |
| https://bugzilla.redhat.com/show_bug.cgi?id=2489180 | [email protected] |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | [email protected] |
Affected Products
No affected product data is available for this CVE.
Change History
7 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 25, 2026 | CVE Translated | [email protected] |
| Jun 29, 2026 | CVE Modified | [email protected] |
| Jun 26, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jun 16, 2026 | New CVE Received | [email protected] |