Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2026-12398

HIGH 7.5EPSS 75%

Galaxy_ng: shell injection in legacy role import via unsanitized git ref names

Also known as GHSA-6hw7-j4jw-wpff, PYSEC-2026-2486

Mitigation

  • Vendor workaround: 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.

Who should check

  • Projects that depend on PyPI package galaxy-ng (<= 4.9.2)
  • Anyone running Red Hat Ansible Automation Platform 2 (versions: see the vendor advisory)
  • Anyone running Red Hat Ansible Automation Platform 2 all versions

Vulnerability facts

Affected
galaxy-ng <= 4.9.2
Fixed in
No fix listed yet
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Remote, login needed
CVSS
7.5 (v3.1, CNA)CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack vector: Network
  • Attack complexity: High
  • Privileges required: Low
  • User interaction: None
  • Scope: Unchanged
  • Confidentiality impact: High
  • Integrity impact: High
  • Availability impact: High
EPSS
1.52% chance of exploitation in 30 days (percentile 75, 2026-11-26)
CWE
CWE-78
Published
Modified

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 and fixed versions

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2026-12398. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-12398.md
Affected: galaxy-ng <= 4.9.2
Fixed in: no fixed version listed yet

Steps:
1. Search this machine and project for galaxy-ng (PyPI), Red Hat Ansible Automation Platform 2: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2026-12398 being exploited?

There is no confirmed exploitation: CVE-2026-12398 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.52% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2026-12398?

High: CVSS 7.5 (v3.1, scored by CNA). Remote, login needed. The attack needs conditions outside the attacker's control, which makes it harder.

Which versions are affected by CVE-2026-12398?

galaxy-ng <= 4.9.2.

Is there a fix for CVE-2026-12398?

No fixed version is listed in the sources yet. Vendor workaround: 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.

How do I check if I'm affected by CVE-2026-12398?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors