7.5high
Galaxy_ng: shell injection in legacy role import via unsanitized git ref names
- Severity
- 7.5high CVSS:3.1 by redhat
- Exploit likelihood
- 0.89% (higher than 60% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- redhat
- Also known as
- GHSA-6hw7-j4jw-wpffPYSEC-2026-2486
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
| Product or package | Versions | Reported by |
|---|---|---|
| ansible-automation-platform-24/hub-rhel8 | Not specified | CVE List |
| ansible-automation-platform-25/hub-rhel8 | Not specified | CVE List |
| ansible-automation-platform-26/hub-rhel9 | Not specified | CVE List |
| ansible-automation-platform-27/hub-rhel9 | Not specified | CVE List |
| automation-hub | Not specified | CVE List |
| python3.11-galaxy-ng | Not specified | CVE List |
| python3.12-galaxy-ng | Not specified | CVE List |
| python3x-galaxy-ng | Not specified | CVE List |
| python-galaxy-ng | Not specified | CVE List |
| galaxy-ng (PyPI) | up to 4.9.2 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| redhat | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
| PyPA Advisory Database | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
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.
NVD (es)
Una vulnerabilidad de inyección de comandos fue encontrada en galaxy_ng. La función do_git_checkout() en la API (v1) de importación de roles heredados interpola nombres de referencia de git no saneados (nombres de rama/etiqueta) en comandos de shell ejecutados a través de subprocess.run() con shell=True. Un usuario autenticado que controla un repositorio git puede crear una rama o etiqueta con metacaracteres de shell en el nombre para lograr ejecución remota de código en el worker de pulp. El endpoint vulnerable solo es accesible cuando GALAXY_ENABLE_LEGACY_ROLES está configurado como True, lo cual no es la configuración predeterminada.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-12398 changed 2026-11-05 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-6hw7-j4jw-wpff changed 2026-07-13 | CC-BY-4.0 |
| NVD | CVE-2026-12398 changed 2026-10-25 | Public domain |
| PyPA Advisory Database | PYSEC-2026-2486 changed 2026-07-13 | CC-BY-4.0 |