CVE-2020-1733
Ansible vulnerable to Exposure of Resource to Wrong Sphere and Insecure Temporary File
Reported by redhat · Published March 11, 2020
ansible is fixed in 2.9.7, 2.9.6, 2.8.11 and 2 more (PyPI)
A race condition flaw was found in Ansible Engine 2.7.17 and prior, 2.8.9 and prior, 2.9.6 and prior when running a playbook with an unprivileged become user. When Ansible needs to run a module with become user, the temporary directory is created in /var/tmp. This directory is created with "umask 77 && mkdir -p <dir>"; this operation does not fail if the directory already exists and is owned by another user. An attacker could take advantage to gain control of the become user as the target directory can be retrieved by iterating '/proc/<pid>/cmdline'.
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 | 2.9.7, 2.9.6, 2.8.11, 2.8.8, 2.7.17 |
| ansible | Alpine | 2.9.7-r0, 2.8.11-r0, 2.7.17-r0 |
| ansible | redhat | 2.9.5, 2.8.8, 2.7.16 |
| ansible | Ubuntu:Pro:18.04:LTS | 2.5.1+dfsg-1ubuntu0.1+esm1 |
| ansible | Ubuntu:Pro:20.04:LTS | 2.9.6+dfsg-1ubuntu0.1~esm1 |
| ansible | Ubuntu:Pro:16.04:LTS | 2.0.0.2-2ubuntu1.3+esm1 |
| ansible_tower | redhat | 3.6.3, 3.5.5, 3.4.5, 3.3.4 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Red Hat | Ansible | 2.7.17 and prior, 2.8.9 and prior, 2.9.6 and prior |
| alpine | ansible | 0, 0, 0 |
| PyPI | ansible | 2.9.0a1, 0, 2.8.0a1 |
| Red Hat | Ansible | 2.9.6, 2.7.17, 2.8.9 |
| alpine | ansible-base | 0 |
Timeline
- Mar 11, 2020 CVE Published
- Apr 14, 2021 EPSS Score (30 in total, the first dated here)
- Nov 18, 2024 CVE Updated
- Mar 6, 2026 Distribution Patch (6 in total, the first dated here)
- Mar 6, 2026 Security Advisory (12 in total, the first dated here)
- Sep 3, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2020-1733
vulnetix vdb fixes CVE-2020-1733
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-2020-1733/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- x_refsource_CONFIRM
- x_refsource_MISC
- FEDORA-2020-1b6ce91e37 vendor-advisoryx_refsource_FEDORA
- FEDORA-2020-3990f03ba3 vendor-advisoryx_refsource_FEDORA
- FEDORA-2020-f80154b5b4 vendor-advisoryx_refsource_FEDORA
- [debian-lts-announce] 20200505 [SECURITY] [DLA 2202-1] ansible security update mailing-listx_refsource_MLIST
- GLSA-202006-11 vendor-advisoryx_refsource_GENTOO
- DSA-4950 vendor-advisoryx_refsource_DEBIAN
- https://nvd.nist.gov/vuln/detail/CVE-2020-1733 advisory
- https://github.com/advisories/GHSA-g4mq-6fp5-qwcf advisory
- https://github.com/ansible/ansible/commit/80b9a0a25c5f75e84aefc8f2b293fb1933b154f2 patch
- https://github.com/ansible/ansible/commit/8251d9f4c2bc82632ab992277fcd30ccbf87aa47 patch
- https://github.com/ansible/ansible/commit/ecf99d5e1ff732a7777010facd6c98bb0994605e patch
- https://github.com/ansible/ansible url
- https://github.com/pypa/advisory-database/tree/main/vulns/ansible/PYSEC-2020-5.yaml advisory
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DKPA4KC3OJSUFASUYMG66HKJE7ADNGFW url
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MRRYUU5ZBLPBXCYG6CFP35D64NP2UB2S url
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/WQVOQD4VAIXXTVQAJKTN7NUGTJFE2PCB url