CVE-2026-105929

Ansible-core: ansible-galaxy role install path traversal via unvalidated role name allows file writes and directory deletion outside the roles directory

Published Nov 18, 2026 CVSS 3.1 · 8.1 High EPSS n/a KEV · Not listed
Description
A path traversal vulnerability (CWE-22) was found in ansible-core's ansible-galaxy role installation. An explicit role "name" taken from a role's meta/requirements.yml is used to construct the on-disk installation path without validating that the resulting destination stays within the selected roles directory. A name containing "../" escapes that directory, and an absolute name replaces it entirely. Because ansible-galaxy processes transitive dependencies from an installed role's meta/requirements.yml, a malicious role publisher can cause attacker-supplied files to be written outside the operator's chosen roles directory when the operator installs the role, and, when --force is used, can cause an existing role directory outside that path to be removed and replaced. The impact is bounded by the invoking user's filesystem permissions and requires the operator to install the attacker-influenced content.

Analysis

AI-generated

Technical impact

The vulnerability arises from ansible-core's handling of the role name field during ansible-galaxy role installation. The supplied name is concatenated to form the on‑disk installation path without verifying that the resulting path remains inside the configured roles directory. If the name contains two dots and a slash it can escape the intended directory, and if it is an absolute path it can overwrite or replace arbitrary locations on the filesystem. An attacker who controls a role’s meta requirements yaml can thus inject files or, when ansible-galaxy is invoked with force, delete a directory outside the roles path. The impact is limited to the privileges of the operator performing the install, but it can lead to privilege escalation or malicious code execution if the operator has elevated rights.

Affected Systems

The affected products span many of Red Hat’s automation and platform offerings. Red Hat Ansible Automation Platform (v2), Ansible Core (v2), and all roles and collections managed through this platform are vulnerable. The issue also affects Red Hat Advanced Cluster Management for Kubernetes (v2), Red Hat OpenShift Service Mesh (v3), the Red Hat OpenShift Container Platform (v4 and v5), OpenStack Platform (v17.1 and v18.0), the Red Hat Migration Toolkit for Applications (v8) and Migration Toolkit for Virtualization (v2), as well as the Enterprise Linux 8/9/10 systems that host these tools. Red Hat Enterprise Linux 8 and 9, along with related Discovery, Satellite, and Certification tools, are also affected via the underlying Ansible components.

Risk and Exploitability

The CVSS score of 8.1 classifies this as high severity. Because the exploit requires a privileged operator to install a malicious role, the likelihood of widespread exploitation is moderate, and the EPSS data is currently unavailable, which suggests it has not been widely observed in the wild. The vulnerability is not listed in CISA’s KEV catalog, but the risk remains significant for organizations that routinely install roles from external sources. The attack vector is local to the operator executing ansible-galaxy, but an untrusted role repository can indirectly expose the system to attackers if the role is installed.

Remediation

Vendor Workaround

Install roles and collections only from trusted sources. Before installing a role, review its meta/requirements.yml (including transitive dependencies) for any "name" value containing "../" or an absolute path. Avoid using "ansible-galaxy role install --force" against untrusted content.


OpenCVE Recommended Actions

  • Install roles and collections only from trusted sources.
  • Before installing a role, review its meta requirements yaml (including transitive dependencies) for any name value containing two dots and a slash or an absolute path.
  • Avoid using ansible-galaxy role install with the --force option on untrusted content.
  • When a patched version of ansible-core is released, upgrade to that version to eliminate the path‑validation flaw.

Generated by OpenCVE AI on November 18, 2026 at 06:04 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Description A path traversal vulnerability (CWE-22) was found in ansible-core's ansible-galaxy role installation. An explicit role "name" taken from a role's meta/requirements.yml is used to construct the on-disk installation path without validating that the resulting destination stays within the selected roles directory. A name containing "../" escapes that directory, and an absolute name replaces it entirely. Because ansible-galaxy processes transitive dependencies from an installed role's meta/requirements.yml, a malicious role publisher can cause attacker-supplied files to be written outside the operator's chosen roles directory when the operator installs the role, and, when --force is used, can cause an existing role directory outside that path to be removed and replaced. The impact is bounded by the invoking user's filesystem permissions and requires the operator to install the attacker-influenced content.
Title Ansible-core: ansible-galaxy role install path traversal via unvalidated role name allows file writes and directory deletion outside the roles directory
First Time appeared Redhat
Redhat acm
Redhat ansible Automation Platform
Redhat ansible Core
Redhat ansible Portal
Redhat certifications
Redhat discovery
Redhat enterprise Linux
Redhat migration Toolkit Applications
Redhat migration Toolkit Virtualization
Redhat openshift
Redhat openstack
Redhat rhui
Redhat satellite
Redhat service Mesh
Redhat stf
Weaknesses CWE-22
CPEs cpe:/a:redhat:acm:2
cpe:/a:redhat:ansible_automation_platform:2
cpe:/a:redhat:ansible_core:2
cpe:/a:redhat:ansible_portal:2
cpe:/a:redhat:certifications:9
cpe:/a:redhat:discovery:2::el8
cpe:/a:redhat:enterprise_linux:10
cpe:/a:redhat:enterprise_linux:8
cpe:/a:redhat:enterprise_linux:9
cpe:/a:redhat:migration_toolkit_applications:8
cpe:/a:redhat:migration_toolkit_virtualization:2
cpe:/a:redhat:openshift:4
cpe:/a:redhat:openshift:5
cpe:/a:redhat:openstack:17.1
cpe:/a:redhat:openstack:18.0
cpe:/a:redhat:rhui:5::el9
cpe:/a:redhat:satellite:6
cpe:/a:redhat:service_mesh:3
cpe:/a:redhat:stf:1.5
Vendors & Products Redhat
Redhat acm
Redhat ansible Automation Platform
Redhat ansible Core
Redhat ansible Portal
Redhat certifications
Redhat discovery
Redhat enterprise Linux
Redhat migration Toolkit Applications
Redhat migration Toolkit Virtualization
Redhat openshift
Redhat openstack
Redhat rhui
Redhat satellite
Redhat service Mesh
Redhat stf
References
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H'}