{"id":"CVE-2026-12398","aliases":["CVE-2026-12398","GHSA-6hw7-j4jw-wpff","PYSEC-2026-2486"],"related":[],"kind":"vulnerability","state":"published","title":"Galaxy_ng: shell injection in legacy role import via unsanitized git ref names","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2026-06-16T14:52:06.734Z","modified":"2026-11-05T17:02:37.551Z","severity":{"scorer":"redhat","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"redhat","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.5,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-78"],"affected":[{"ranges":[],"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2","package":"ansible-automation-platform-24/hub-rhel8","cpe":"cpe:/a:redhat:ansible_automation_platform:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2","package":"ansible-automation-platform-25/hub-rhel8","cpe":"cpe:/a:redhat:ansible_automation_platform:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2","package":"ansible-automation-platform-26/hub-rhel9","cpe":"cpe:/a:redhat:ansible_automation_platform:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2","package":"ansible-automation-platform-27/hub-rhel9","cpe":"cpe:/a:redhat:ansible_automation_platform:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2","package":"automation-hub","cpe":"cpe:/a:redhat:ansible_automation_platform:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2","package":"python3.11-galaxy-ng","cpe":"cpe:/a:redhat:ansible_automation_platform:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2","package":"python3.12-galaxy-ng","cpe":"cpe:/a:redhat:ansible_automation_platform:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2","package":"python3x-galaxy-ng","cpe":"cpe:/a:redhat:ansible_automation_platform:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2","package":"python-galaxy-ng","cpe":"cpe:/a:redhat:ansible_automation_platform:2","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"4.9.2"}],"ecosystem":"PyPI","package":"galaxy-ng","purl":"pkg:pypi/galaxy-ng","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"4.9.2"}],"ecosystem":"PyPI","package":"galaxy-ng","purl":"pkg:pypi/galaxy-ng","source":"pysec"}],"references":[{"url":"https://access.redhat.com/security/cve/CVE-2026-12398","tags":["vdb-entry","web","x-refsource-redhat"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2489180","tags":["issue-tracking","web","x-refsource-redhat"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-12398","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/ansible/galaxy_ng","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/galaxy-ng","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-6hw7-j4jw-wpff","tags":["advisory"],"sources":["pysec"]}],"credits":["This issue was discovered by Chris Meyers (Red Hat)."],"assigner":"redhat","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-06-16T00:00:00.000Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-12398","url":"https://www.cve.org/CVERecord?id=CVE-2026-12398","licence":"CVE Terms of Use","modified":"2026-11-05T17:02:37.551Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-6hw7-j4jw-wpff","url":"https://github.com/advisories/GHSA-6hw7-j4jw-wpff","licence":"CC-BY-4.0","modified":"2026-07-13T16:42:52.586Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-12398","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-12398","licence":"Public domain","modified":"2026-10-25T23:10:00.167Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2486","url":"https://osv.dev/vulnerability/PYSEC-2026-2486","licence":"CC-BY-4.0","modified":"2026-07-13T16:32:37.446Z"}],"updatedAt":"2026-11-25T22:59:24.757Z","epss":{"score":0.00889,"percentile":0.60403,"date":"2026-12-01T12:00:22.000Z"}}