CVE-2023-5115
Ansible: malicious role archive can cause ansible-galaxy to overwrite arbitrary files
Reported by redhat · Published December 18, 2023
ansible is fixed in 8.5.0 (PyPI)
An absolute path traversal attack exists in the Ansible automation platform. This flaw allows an attacker to craft a malicious Ansible role and make the victim execute the role. A symlink can be used to overwrite a file outside of the extraction path.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| ansible | PyPI | 8.5.0 |
| ansible-test | Amazon Linux | 2.15.3-1.amzn2023.0.3 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Red Hat | Red Hat Ansible Automation Platform 2.3 for RHEL 8 | 0:2.14.11-1.el8ap |
| Red Hat | Red Hat Ansible Automation Platform 2.3 for RHEL 8 | 0:2.14.11-1.el8ap |
| Red Hat | Red Hat Ansible Automation Platform 2.3 for RHEL 8 | 0:2.14.11-1.el8ap |
| Red Hat | Red Hat Ansible Automation Platform 2.3 for RHEL 9 | 0:2.14.11-1.el9ap |
| Red Hat | Red Hat Ansible Automation Platform 2.3 for RHEL 9 | 0:2.14.11-1.el9ap |
| Red Hat | Red Hat Ansible Automation Platform 2.3 for RHEL 9 | 0:2.14.11-1.el9ap |
| Red Hat | Red Hat Ansible Automation Platform 2.4 for RHEL 8 | 0:2.15.5-1.el8ap |
| Red Hat | Red Hat Ansible Automation Platform 2.4 for RHEL 8 | 0:2.15.5-1.el8ap |
| Red Hat | Red Hat Ansible Automation Platform 2.4 for RHEL 8 | 0:2.15.5-1.el8ap |
| Red Hat | Red Hat Ansible Automation Platform 2.4 for RHEL 9 | 0:2.15.5-1.el9ap |
| Red Hat | Red Hat Ansible Automation Platform 2.4 for RHEL 9 | 0:2.15.5-1.el9ap |
| Red Hat | Red Hat Ansible Automation Platform 2.4 for RHEL 9 | 0:2.15.5-1.el9ap |
| Red Hat | Red Hat Ansible Automation Platform 1.2 | |
| Red Hat | Red Hat Ansible Automation Platform 1.2 | |
| Red Hat | Red Hat Ansible Automation Platform 2.4 for RHEL 8 | 0:2.15.5-1.el8ap |
| amazon:2023 | ansible-test | 0 |
| amazon:2023 | ansible-core | 0 |
| Red Hat | Red Hat Ansible Automation Platform 2.4 for RHEL 9 | 0:2.15.5-1.el9ap |
| PyPI | ansible | 0 |
| Red Hat | Red Hat Ansible Automation Platform 2.3 for RHEL 8 | 0:2.14.11-1.el8ap |
…and 1 more
Timeline
- Sep 26, 2023 CVE Published
- Dec 19, 2023 EPSS Score (30 in total, the first dated here)
- Dec 20, 2023 PoC Published
- Oct 5, 2024 Coalition ESS Score (11 in total, the first dated here)
- Mar 10, 2026 Security Advisory (6 in total, the first dated here)
- Jun 17, 2026 CVE Updated
- Nov 8, 2026 Distribution Patch (2 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2023-5115
vulnetix vdb fixes CVE-2023-5115
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2023-5115/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- RHSA-2023:5701 vendor-advisoryx_refsource_REDHAT
- RHSA-2023:5758 vendor-advisoryx_refsource_REDHAT
- vdb-entryx_refsource_REDHAT
- RHBZ#2233810 issue-trackingx_refsource_REDHAT
- https://nvd.nist.gov/vuln/detail/CVE-2023-5115 advisory
- https://github.com/advisories/GHSA-jpvw-p8pr-9g2x advisory
- https://github.com/ansible/ansible/commit/1e930684bc0a76ec3d094cd326738ad26416541c patch
- https://github.com/ansible-community/ansible-build-data/blob/16d36538b96c65d9e0e28d89781361b69857ac0e/8/CHANGELOG-v8.rst#L221 url
- https://github.com/ansible/ansible url
- https://lists.debian.org/debian-lts-announce/2023/12/msg00018.html url