{"id":"CVE-2026-12398","aliases":["GHSA-6hw7-j4jw-wpff","PYSEC-2026-2486"],"summary":"Galaxy_ng: shell injection in legacy role import via unsanitized git ref names","published_at":"2026-06-16T00:00:00Z","modified_at":"2026-11-05T17:02:37.551Z","products":[{"slug":"ansible","name":"Ansible / Ansible Automation Platform","category":"iac"},{"slug":"rhel","name":"Red Hat Enterprise Linux","category":"red-hat"}],"rating":{"severity":"high","score":7.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","attack_path":"internet_authenticated","user_interaction":false,"malicious":false,"red_hat":"Moderate","vendor_ratings":[{"source":"Red Hat","rating":"Moderate"}]},"fix_available":false,"kev":{"listed":false,"ransomware":false},"public_exploit":false,"exploits":[],"epss":{"score":0.0088900001719594,"percentile":0.6020399928092957,"date":"2026-11-20T00:00:00Z"},"priority":8.5,"record_count":4,"vendors":["Red Hat","GitHub","PyPI"],"details":"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_stack":[{"ecosystem":"CVE","package":"Red Hat/Red Hat Ansible Automation Platform 2","provider":"cvelistv5","source":"CVE-2026-12398","relation":"self"},{"ecosystem":"CVE","package":"Red Hat/Red Hat Ansible Automation Platform 2","provider":"cvelistv5","source":"CVE-2026-12398","relation":"self"},{"ecosystem":"CVE","package":"Red Hat/Red Hat Ansible Automation Platform 2","provider":"cvelistv5","source":"CVE-2026-12398","relation":"self"},{"ecosystem":"CVE","package":"Red Hat/Red Hat Ansible Automation Platform 2","provider":"cvelistv5","source":"CVE-2026-12398","relation":"self"},{"ecosystem":"CVE","package":"Red Hat/Red Hat Ansible Automation Platform 2","provider":"cvelistv5","source":"CVE-2026-12398","relation":"self"},{"ecosystem":"CVE","package":"Red Hat/Red Hat Ansible Automation Platform 2","provider":"cvelistv5","source":"CVE-2026-12398","relation":"self"},{"ecosystem":"CVE","package":"Red Hat/Red Hat Ansible Automation Platform 2","provider":"cvelistv5","source":"CVE-2026-12398","relation":"self"},{"ecosystem":"CVE","package":"Red Hat/Red Hat Ansible Automation Platform 2","provider":"cvelistv5","source":"CVE-2026-12398","relation":"self"},{"ecosystem":"Red Hat:ansible_automation_platform:2","package":"automation-hub","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"provider":"redhat-vex","source":"CVE-2026-12398","relation":"self"}],"affected_other":[{"ecosystem":"PyPI","package":"galaxy-ng","purl":"pkg:pypi/galaxy-ng","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"4.9.2"}]}],"versions":["4.2.0","4.2.0a10","4.2.0a12","4.2.0a3","4.2.0a4","4.2.0a5","4.2.0a6","4.2.0a7","4.2.0a8","4.2.0a9","4.2.0b1","4.2.0b2","4.2.0b3","4.2.0rc1","4.2.0rc2","4.2.0rc3","4.2.1","4.2.2","4.2.3","4.2.3b1","4.2.4","4.2.5","4.2.6","4.2.7","4.2.8","4.3.0","4.3.0a1","4.3.0a2","4.3.0b4","4.3.1","4.3.2","4.3.3","4.3.4","4.3.5","4.4.0","4.4.0a1","4.4.0a2","4.4.0b1","4.4.0b2","4.4.1","4.4.2","4.4.3","4.4.4","4.4.5","4.5.0","4.5.0b1","4.5.1","4.5.2","4.5.3","4.5.4","4.5.5","4.6.0","4.6.1","4.6.2","4.6.3","4.6.4","4.6.5","4.6.6","4.7.0","4.7.1","4.7.2","4.7.3","4.8.0","4.8.1","4.9.0","4.9.1","4.9.2"],"provider":"osv","source":"GHSA-6hw7-j4jw-wpff","relation":"self"},{"ecosystem":"PyPI","package":"galaxy-ng","purl":"pkg:pypi/galaxy-ng","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"4.9.2"}]}],"versions":["4.2.0","4.2.0a10","4.2.0a12","4.2.0a3","4.2.0a4","4.2.0a5","4.2.0a6","4.2.0a7","4.2.0a8","4.2.0a9","4.2.0b1","4.2.0b2","4.2.0b3","4.2.0rc1","4.2.0rc2","4.2.0rc3","4.2.1","4.2.2","4.2.3","4.2.3b1","4.2.4","4.2.5","4.2.6","4.2.7","4.2.8","4.3.0","4.3.0a1","4.3.0a2","4.3.0b4","4.3.1","4.3.2","4.3.3","4.3.4","4.3.5","4.4.0","4.4.0a1","4.4.0a2","4.4.0b1","4.4.0b2","4.4.1","4.4.2","4.4.3","4.4.4","4.4.5","4.5.0","4.5.0b1","4.5.1","4.5.2","4.5.3","4.5.4","4.5.5","4.6.0","4.6.1","4.6.2","4.6.3","4.6.4","4.6.5","4.6.6","4.7.0","4.7.1","4.7.2","4.7.3","4.8.0","4.8.1","4.9.0","4.9.1","4.9.2"],"provider":"osv","source":"PYSEC-2026-2486","relation":"self"}],"product_status":[{"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2","cpe":"cpe:/a:redhat:ansible_automation_platform:2","status":"affected","packages":["ansible-automation-platform-25/hub-rhel8","ansible-automation-platform-26/hub-rhel9","ansible-automation-platform-27/hub-rhel9","automation-hub"],"package_count":4,"fixed":[],"advisories":[],"note":"Affected","provider":"redhat-vex","source":"CVE-2026-12398"},{"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2","cpe":"cpe:/a:redhat:ansible_automation_platform:2","status":"not_affected","packages":["ansible-automation-platform-24/hub-rhel8"],"package_count":1,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2026-12398"},{"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2","cpe":"cpe:/a:redhat:ansible_automation_platform:2","status":"under_investigation","packages":["python-galaxy-ng","python3.11-galaxy-ng","python3.12-galaxy-ng","python3x-galaxy-ng"],"package_count":4,"fixed":[],"advisories":[],"provider":"redhat-vex","source":"CVE-2026-12398"}],"records":[{"provider":"cvelistv5","source_id":"CVE-2026-12398","relation":"self","url":"https://www.cve.org/CVERecord?id=CVE-2026-12398","license":"CC-BY-4.0","published_at":"2026-06-16T14:52:06.734Z","modified_at":"2026-11-05T17:02:37.551Z","summary":"Galaxy_ng: shell injection in legacy role import via unsanitized git ref names","details":"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.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"CVE-2026-12398"}],"affected":[{"ecosystem":"CVE","package":"Red Hat/Red Hat Ansible Automation Platform 2","provider":"cvelistv5","source":"CVE-2026-12398","relation":"self"},{"ecosystem":"CVE","package":"Red Hat/Red Hat Ansible Automation Platform 2","provider":"cvelistv5","source":"CVE-2026-12398","relation":"self"},{"ecosystem":"CVE","package":"Red Hat/Red Hat Ansible Automation Platform 2","provider":"cvelistv5","source":"CVE-2026-12398","relation":"self"},{"ecosystem":"CVE","package":"Red Hat/Red Hat Ansible Automation Platform 2","provider":"cvelistv5","source":"CVE-2026-12398","relation":"self"},{"ecosystem":"CVE","package":"Red Hat/Red Hat Ansible Automation Platform 2","provider":"cvelistv5","source":"CVE-2026-12398","relation":"self"},{"ecosystem":"CVE","package":"Red Hat/Red Hat Ansible Automation Platform 2","provider":"cvelistv5","source":"CVE-2026-12398","relation":"self"},{"ecosystem":"CVE","package":"Red Hat/Red Hat Ansible Automation Platform 2","provider":"cvelistv5","source":"CVE-2026-12398","relation":"self"},{"ecosystem":"CVE","package":"Red Hat/Red Hat Ansible Automation Platform 2","provider":"cvelistv5","source":"CVE-2026-12398","relation":"self"}],"product_status":[],"references":[{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2026-12398"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2489180"}]},{"provider":"osv","source_id":"GHSA-6hw7-j4jw-wpff","relation":"self","url":"https://osv.dev/vulnerability/GHSA-6hw7-j4jw-wpff","license":"CC-BY-4.0","published_at":"2026-06-16T15:33:51Z","modified_at":"2026-07-13T16:42:52.586766Z","summary":"Galaxy NG: command injection vulnerability","details":"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.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"GHSA-6hw7-j4jw-wpff"}],"affected":[{"ecosystem":"PyPI","package":"galaxy-ng","purl":"pkg:pypi/galaxy-ng","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"4.9.2"}]}],"versions":["4.2.0","4.2.0a10","4.2.0a12","4.2.0a3","4.2.0a4","4.2.0a5","4.2.0a6","4.2.0a7","4.2.0a8","4.2.0a9","4.2.0b1","4.2.0b2","4.2.0b3","4.2.0rc1","4.2.0rc2","4.2.0rc3","4.2.1","4.2.2","4.2.3","4.2.3b1","4.2.4","4.2.5","4.2.6","4.2.7","4.2.8","4.3.0","4.3.0a1","4.3.0a2","4.3.0b4","4.3.1","4.3.2","4.3.3","4.3.4","4.3.5","4.4.0","4.4.0a1","4.4.0a2","4.4.0b1","4.4.0b2","4.4.1","4.4.2","4.4.3","4.4.4","4.4.5","4.5.0","4.5.0b1","4.5.1","4.5.2","4.5.3","4.5.4","4.5.5","4.6.0","4.6.1","4.6.2","4.6.3","4.6.4","4.6.5","4.6.6","4.7.0","4.7.1","4.7.2","4.7.3","4.8.0","4.8.1","4.9.0","4.9.1","4.9.2"],"provider":"osv","source":"GHSA-6hw7-j4jw-wpff","relation":"self"}],"product_status":[],"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-12398"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2026-12398"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2489180"},{"type":"PACKAGE","url":"https://github.com/ansible/galaxy_ng"}]},{"provider":"osv","source_id":"PYSEC-2026-2486","relation":"self","url":"https://osv.dev/vulnerability/PYSEC-2026-2486","license":"CC-BY-4.0","published_at":"2026-07-13T15:46:17.919996Z","modified_at":"2026-07-13T16:32:37.446342Z","summary":"Galaxy NG: command injection vulnerability","details":"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.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"PYSEC-2026-2486"}],"affected":[{"ecosystem":"PyPI","package":"galaxy-ng","purl":"pkg:pypi/galaxy-ng","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"4.9.2"}]}],"versions":["4.2.0","4.2.0a10","4.2.0a12","4.2.0a3","4.2.0a4","4.2.0a5","4.2.0a6","4.2.0a7","4.2.0a8","4.2.0a9","4.2.0b1","4.2.0b2","4.2.0b3","4.2.0rc1","4.2.0rc2","4.2.0rc3","4.2.1","4.2.2","4.2.3","4.2.3b1","4.2.4","4.2.5","4.2.6","4.2.7","4.2.8","4.3.0","4.3.0a1","4.3.0a2","4.3.0b4","4.3.1","4.3.2","4.3.3","4.3.4","4.3.5","4.4.0","4.4.0a1","4.4.0a2","4.4.0b1","4.4.0b2","4.4.1","4.4.2","4.4.3","4.4.4","4.4.5","4.5.0","4.5.0b1","4.5.1","4.5.2","4.5.3","4.5.4","4.5.5","4.6.0","4.6.1","4.6.2","4.6.3","4.6.4","4.6.5","4.6.6","4.7.0","4.7.1","4.7.2","4.7.3","4.8.0","4.8.1","4.9.0","4.9.1","4.9.2"],"provider":"osv","source":"PYSEC-2026-2486","relation":"self"}],"product_status":[],"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-12398"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2026-12398"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2489180"},{"type":"PACKAGE","url":"https://github.com/ansible/galaxy_ng"},{"type":"PACKAGE","url":"https://pypi.org/project/galaxy-ng"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-6hw7-j4jw-wpff"}]},{"provider":"redhat-vex","source_id":"CVE-2026-12398","relation":"self","url":"https://access.redhat.com/security/cve/CVE-2026-12398","license":"CC-BY-4.0","published_at":"2026-06-16T00:00:00Z","modified_at":"2026-07-28T18:10:44Z","summary":"galaxy_ng: shell injection in legacy role import via unsanitized git ref names","details":"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.","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"CVE-2026-12398"},{"type":"Red Hat","score":"Moderate","source":"CVE-2026-12398"}],"affected":[{"ecosystem":"Red Hat:ansible_automation_platform:2","package":"automation-hub","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"provider":"redhat-vex","source":"CVE-2026-12398","relation":"self"}],"product_status":[{"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2","cpe":"cpe:/a:redhat:ansible_automation_platform:2","status":"affected","packages":["ansible-automation-platform-25/hub-rhel8","ansible-automation-platform-26/hub-rhel9","ansible-automation-platform-27/hub-rhel9","automation-hub"],"package_count":4,"fixed":[],"advisories":[],"note":"Affected","provider":"redhat-vex","source":"CVE-2026-12398"},{"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2","cpe":"cpe:/a:redhat:ansible_automation_platform:2","status":"not_affected","packages":["ansible-automation-platform-24/hub-rhel8"],"package_count":1,"fixed":[],"advisories":[],"note":"vulnerable_code_not_present","provider":"redhat-vex","source":"CVE-2026-12398"},{"vendor":"Red Hat","product":"Red Hat Ansible Automation Platform 2","cpe":"cpe:/a:redhat:ansible_automation_platform:2","status":"under_investigation","packages":["python-galaxy-ng","python3.11-galaxy-ng","python3.12-galaxy-ng","python3x-galaxy-ng"],"package_count":4,"fixed":[],"advisories":[],"provider":"redhat-vex","source":"CVE-2026-12398"}],"references":[{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-12398.json"},{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2026-12398"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2489180"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2026-12398"},{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-12398"}]}],"references":[{"type":"WEB","url":"https://access.redhat.com/security/cve/CVE-2026-12398"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2489180"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-12398"},{"type":"PACKAGE","url":"https://github.com/ansible/galaxy_ng"},{"type":"PACKAGE","url":"https://pypi.org/project/galaxy-ng"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-6hw7-j4jw-wpff"},{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-12398.json"},{"type":"WEB","url":"https://www.cve.org/CVERecord?id=CVE-2026-12398"}],"sources":[{"provider":"cvelistv5","source_id":"CVE-2026-12398","url":"https://www.cve.org/CVERecord?id=CVE-2026-12398","license":"CC-BY-4.0","modified_at":"2026-11-05T17:02:37.551Z","relation":"self"},{"provider":"osv","source_id":"GHSA-6hw7-j4jw-wpff","url":"https://osv.dev/vulnerability/GHSA-6hw7-j4jw-wpff","license":"CC-BY-4.0","modified_at":"2026-07-13T16:42:52.586766Z","relation":"self"},{"provider":"osv","source_id":"PYSEC-2026-2486","url":"https://osv.dev/vulnerability/PYSEC-2026-2486","license":"CC-BY-4.0","modified_at":"2026-07-13T16:32:37.446342Z","relation":"self"},{"provider":"redhat-vex","source_id":"CVE-2026-12398","url":"https://access.redhat.com/security/cve/CVE-2026-12398","license":"CC-BY-4.0","modified_at":"2026-07-28T18:10:44Z","relation":"self"}]}
