cve.bz

CVE-2026-12398 OS Command Injection

7.5 highEPSS 0.9%

High (7.5). EPSS 0.9% estimated probability of exploitation activity in the next 30 days.

On this page
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

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
0.9% (unchanged from 0.9% a week ago; 0.9% 30 days ago) estimated probability of exploitation activity in the next 30 days; 60th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-06-16. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-78 Improper Neutralization of Special Elements used in an OS Command (OS Command Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Awaiting analysis
Record from
the NVD, synced

Ask an AI about this CVE

Show the promptExplain CVE-2026-12398 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-12398?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-12398?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-12398 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-6hw7-j4jw-wpffPyPIgalaxy-ng<=4.9.2no fix published
PYSEC-2026-2486PyPIgalaxy-ng<=4.9.2no fix published

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

Red Hat Ansible Automation Platform ships galaxy_ng with GALAXY_ENABLE_LEGACY_ROLES set to False by default in all supported versions (2.4, 2.5, 2.6). When this setting is False, the vulnerable v1 API endpoint is not registered and returns a 404 response, making the vulnerability unreachable. Standard AAP deployments are not affected. Customers who have explicitly enabled legacy role support (GALAXY_ENABLE_LEGACY_ROLES=True) should apply the mitigation steps above until a fix is available.

Red Hat's mitigation

The following practices would help for avoiding exposure and mitigate this flaw:

1. Ensure that GALAXY_ENABLE_LEGACY_ROLES is set to False (the default) in your Galaxy/Hub configuration. This prevents the v1 API routes from being registered, making the vulnerable endpoint entirely unreachable.

2. If legacy role support must be enabled, restrict access to the Galaxy/Hub API to trusted users only. The vulnerability requires authentication, so limiting who can authenticate reduces exposure.

3. Monitor import activity for suspicious git references containing shell metacharacters in branch or tag names.

ProductPackageStateAdvisory
Red Hat Ansible Automation Platform 2ansible-automation-platform-24/hub-rhel8Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-25/hub-rhel8Affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-26/hub-rhel9Affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-27/hub-rhel9Affected
Red Hat Ansible Automation Platform 2automation-hubAffected
Red Hat Ansible Automation Platform 2python3.11-galaxy-ngUnder investigation
Red Hat Ansible Automation Platform 2python3.12-galaxy-ngUnder investigation
Red Hat Ansible Automation Platform 2python3x-galaxy-ngUnder investigation
Red Hat Ansible Automation Platform 2python-galaxy-ngUnder investigation

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-12398.

Attack patterns (CAPEC)

  • CAPEC-6 Argument Injection Likelihood: High · Severity: High
  • CAPEC-15 Command Delimiters Likelihood: High · Severity: High
  • CAPEC-43 Exploiting Multiple Input Interpretation Layers Likelihood: Medium · Severity: High
  • CAPEC-88 OS Command Injection Likelihood: High · Severity: High
  • CAPEC-108 Command Line Execution through SQL Injection Likelihood: Low · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON