CVE-2026-12398: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in Red Hat Red Hat Ansible Automation Platform 2
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.
AI Analysis
Technical Summary
This vulnerability arises from improper neutralization of special elements in OS commands within the do_git_checkout() function of the legacy role import API (v1) in Red Hat Ansible Automation Platform 2. The function uses subprocess.run() with shell=True and interpolates unsanitized git ref names (branch or tag names) into shell commands. An authenticated attacker who controls a git repository can craft branch or tag names containing shell metacharacters to execute arbitrary code remotely on the pulp worker. The vulnerable endpoint is only reachable when the GALAXY_ENABLE_LEGACY_ROLES configuration is set to True, which is not the default setting.
Potential Impact
Successful exploitation allows an authenticated user with control over a git repository to achieve remote code execution on the pulp worker component of Red Hat Ansible Automation Platform 2. This can lead to full compromise of the affected system. The vulnerability has a CVSS 3.1 base score of 7.5, indicating high severity with high impact on confidentiality, integrity, and availability. However, the attack requires authentication and the vulnerable endpoint is not enabled by default.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory at https://access.redhat.com/security/cve/CVE-2026-12398 for current remediation guidance. As a mitigating factor, the vulnerable endpoint is only accessible if GALAXY_ENABLE_LEGACY_ROLES is set to True; ensuring this setting remains False (default) prevents exposure. Monitor Red Hat advisories for official fixes or updates. Avoid enabling legacy roles unless necessary and apply any vendor-provided patches promptly once available.
CVE-2026-12398: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in Red Hat Red Hat Ansible Automation Platform 2
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.
CVSS v3.1
Score 7.5high
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
This vulnerability arises from improper neutralization of special elements in OS commands within the do_git_checkout() function of the legacy role import API (v1) in Red Hat Ansible Automation Platform 2. The function uses subprocess.run() with shell=True and interpolates unsanitized git ref names (branch or tag names) into shell commands. An authenticated attacker who controls a git repository can craft branch or tag names containing shell metacharacters to execute arbitrary code remotely on the pulp worker. The vulnerable endpoint is only reachable when the GALAXY_ENABLE_LEGACY_ROLES configuration is set to True, which is not the default setting.
Potential Impact
Successful exploitation allows an authenticated user with control over a git repository to achieve remote code execution on the pulp worker component of Red Hat Ansible Automation Platform 2. This can lead to full compromise of the affected system. The vulnerability has a CVSS 3.1 base score of 7.5, indicating high severity with high impact on confidentiality, integrity, and availability. However, the attack requires authentication and the vulnerable endpoint is not enabled by default.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory at https://access.redhat.com/security/cve/CVE-2026-12398 for current remediation guidance. As a mitigating factor, the vulnerable endpoint is only accessible if GALAXY_ENABLE_LEGACY_ROLES is set to True; ensuring this setting remains False (default) prevents exposure. Monitor Red Hat advisories for official fixes or updates. Avoid enabling legacy roles unless necessary and apply any vendor-provided patches promptly once available.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- redhat
- Date Reserved
- 2026-06-16T13:22:54.012Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
- Vendor Advisory Urls
- [{"url":"https://access.redhat.com/security/cve/CVE-2026-12398","vendor":"Red Hat"}]
Threat ID: 6a31650b0b89be6888c92022
Added to database: 6/16/2026, 3:00:27 PM
Last enriched: 6/16/2026, 3:15:31 PM
Last updated: 6/17/2026, 5:08:33 AM
Views: 12
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.