Red Hat Migration Toolkit for Applications 8
Ansible-core: ansible-core: ansible-galaxy collection install path traversal via unvalidated artifact-derived collection name allows file writes and directory deletion outside the collections path
A path traversal flaw was found in ansible-core. When installing a collection with ansible-galaxy collection install, the install destination directory is derived from the namespace and name fields declared inside the collection artifact's own metadata, which are not validated as well-formed collection identifiers or checked for path containment. A malicious collection artifact -- delivered as a local file, a remote URL, a source directory, a git repository, or as a dependency -- can use a crafted name value to redirect the install destination outside the configured collections path, causing ansible-galaxy to delete an existing directory writable by the invoking user and then write attacker-controlled files to that location.
Affected versions and mitigation
From the CVE record and the vendor's references.Mitigation
The record names no fix. Check the vendor advisory below.
Workaround
Install collections only from trusted sources. Before installing a collection, or allowing its dependencies to be resolved automatically, review the source's MANIFEST.json (collection_info) or galaxy.yml metadata for a namespace or name value containing a path separator, '..' sequence, or an absolute path. Avoid installing collections from requirements files or dependency chains that reference untrusted repositories or mirrors.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.