CVE-2026-12398
JSON

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 packageVersionsReported by
ansible-automation-platform-24/hub-rhel8Not specifiedCVE List
ansible-automation-platform-25/hub-rhel8Not specifiedCVE List
ansible-automation-platform-26/hub-rhel9Not specifiedCVE List
ansible-automation-platform-27/hub-rhel9Not specifiedCVE List
automation-hubNot specifiedCVE List
python3.11-galaxy-ngNot specifiedCVE List
python3.12-galaxy-ngNot specifiedCVE List
python3x-galaxy-ngNot specifiedCVE List
python-galaxy-ngNot specifiedCVE List
galaxy-ng (PyPI)up to 4.9.2GitHub Advisory Database, PyPA Advisory Database

All scores

redhat7.5high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
PyPA Advisory Database7.5high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-78

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

SourceRecordLicence
CVE ListCVE-2026-12398 changed 2026-11-05CVE Terms of Use
GitHub Advisory DatabaseGHSA-6hw7-j4jw-wpff changed 2026-07-13CC-BY-4.0
NVDCVE-2026-12398 changed 2026-10-25Public domain
PyPA Advisory DatabasePYSEC-2026-2486 changed 2026-07-13CC-BY-4.0