Bug 2234387 (CVE-2023-5189)
Summary: | CVE-2023-5189 Ansible Automation Hub: insecure galaxy-importer tarfile extraction | ||
---|---|---|---|
Product: | [Other] Security Response | Reporter: | Mauro Matteo Cascella <mcascell> |
Component: | vulnerability | Assignee: | Product Security <prodsec-ir-bot> |
Status: | NEW --- | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | unspecified | CC: | adudiak, bbuckingham, bcourt, carnil, davidn, ehelms, epacific, jbreitwe, jcammara, jhardy, jneedle, jobarker, jsherril, kshier, lzap, mabashia, mhulan, nmoumoul, orabin, osapryki, pcreech, rchan, security-response-team, simaishi, sivel, smcdonal, stcannon, teagle, tfister, vinair, yguenane, zsadeh |
Target Milestone: | --- | Keywords: | Security |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: |
A path traversal vulnerability exists in Ansible when extracting tarballs. An attacker could craft a malicious tarball so that when using the galaxy importer of Ansible Automation Hub, a symlink could be dropped on the disk, resulting in files being overwritten.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | Type: | --- | |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 2234389, 2260392 | ||
Bug Blocks: | 2234388 |
Description
Mauro Matteo Cascella
2023-08-24 09:23:04 UTC
Are there any details you can share about this issue? Is there an upstream report about it? Is an upstream fix known? Redirecting NEEDINFO to Vipul who worked on this CVE and should be able to shed some light on it. As far as I know, the affected code can be found in _extract_archive() in galaxy-importer/collection.py. I do not know if there is a patch or any upstream discussions about it, though. The affected code can be found at https://github.com/ansible/galaxy-importer/blob/2c5c7c05fdfb0835878234b36de32902c703616d/galaxy_importer/collection.py#L160-L165 It does not protect against `..` in the middle of paths, nor does it protect against directory traversals in `linkname` only `name`. Thanks This issue has been addressed in the following products: Red Hat Ansible Automation Platform 2.4 for RHEL 8 Red Hat Ansible Automation Platform 2.4 for RHEL 9 Via RHSA-2023:7773 https://access.redhat.com/errata/RHSA-2023:7773 This issue has been addressed in the following products: Red Hat Satellite 6.14 for RHEL 8 Via RHSA-2024:1536 https://access.redhat.com/errata/RHSA-2024:1536 This issue has been addressed in the following products: Red Hat Satellite 6.15 for RHEL 8 Via RHSA-2024:2010 https://access.redhat.com/errata/RHSA-2024:2010 |