CVE-2026-12398 Galaxy_ng: shell injection in legacy role import via unsanitized git ref names

High 7.5 Published Updated

Authenticated users can execute arbitrary commands on the pulp worker via shell metacharacters in git ref names when legacy roles are enabled.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2026-12398?

CVE-2026-12398 is a high-severity command injection vulnerability in Red Hat Ansible Automation Platform 2, published on 16 Jun 2026. Any signed-in user can exploit it over the network, with no action from the victim.

Official 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.

Weakness: CWE-78

Which versions are affected by CVE-2026-12398?

3 open source packages ship an affected version, including galaxy-ng.

PackageAffectedFixed in
galaxy-ng PyPIAll versions to 4.9.2None
galaxy-ng PyPIAll versions to 4.9.2None
galaxy-ng PyPIAll versions to 4.9.2None

How do I fix CVE-2026-12398?

No fix has been published for CVE-2026-12398 yet. Limit exposure of the affected software until one is available.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2026-12398 being exploited?

There is no known exploitation of CVE-2026-12398 in the wild and no public exploit code.

Sources

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

Is CVE-2026-12398 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free