# CVE-2020-1733: Ansible vulnerable to Exposure of Resource to Wrong Sphere and Insecure Temporary File

- Severity: Medium 5.0 (CVSS:3.1, scored by redhat) `CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.40%, higher than 36% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2020-03-11T18:47:40.000Z
- Modified: 2026-06-17T03:02:17.740Z
- Also known as: GHSA-g4mq-6fp5-qwcf, PYSEC-2020-5
- Weaknesses: CWE-362, CWE-377, CWE-668
- Assigned by: redhat

## Description

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'.

(As written by CVE List.)

## Affected

- Red Hat Ansible: 2.7.17 and prior; 2.8.9 and prior; 2.9.6 and prior
- ansible (PyPI): before 2.7.17; from 2.8.0a1 before 2.8.11; from 2.9.0a1 before 2.9.7; from 2.8.0 before 2.8.8; from 2.9.0 before 2.9.6
- redhat ansible: up to 2.7.16; from 2.8.0 before 2.8.8; from 2.9.0 up to 2.9.5
- redhat ansible_tower: up to 3.3.4; from 3.3.5 up to 3.4.5; from 3.5.0 up to 3.5.5; from 3.6.0 up to 3.6.3
- redhat cloudforms_management_engine: 5.0
- redhat openstack: 13
- fedoraproject fedora: 30; 31; 32
- debian debian_linux: 8.0; 10.0

## Every score

- redhat: CVSS:3.1 5.0 Medium `CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:L`
- GitHub: CVSS:3.1 5.0 Low `CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:L`
- GitHub: CVSS:4.0 Low `CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:L/VI:L/VA:L/SC:L/SI:L/SA:L`
- NVD: CVSS:3.1 5.0 Medium `CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:L`
- NVD: CVSS:2.0 3.7 Low `AV:L/AC:H/Au:N/C:P/I:P/A:P`

## References

- <https://github.com/ansible/ansible/issues/67791> (exploit, report, third-party-advisory, web)
- <https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2020-1733> (issue-tracking, report, vendor-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WQVOQD4VAIXXTVQAJKTN7NUGTJFE2PCB/> (vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DKPA4KC3OJSUFASUYMG66HKJE7ADNGFW/> (vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MRRYUU5ZBLPBXCYG6CFP35D64NP2UB2S/> (vendor-advisory)
- <https://lists.debian.org/debian-lts-announce/2020/05/msg00005.html> (mailing-list, third-party-advisory, web)
- <https://security.gentoo.org/glsa/202006-11> (advisory, third-party-advisory, vendor-advisory, web)
- <https://www.debian.org/security/2021/dsa-4950> (third-party-advisory, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2020-1733> (advisory)
- <https://github.com/ansible/ansible/commit/80b9a0a25c5f75e84aefc8f2b293fb1933b154f2> (web)
- <https://github.com/ansible/ansible/commit/8251d9f4c2bc82632ab992277fcd30ccbf87aa47> (web)
- <https://github.com/ansible/ansible/commit/ecf99d5e1ff732a7777010facd6c98bb0994605e> (web)
- <https://github.com/advisories/GHSA-g4mq-6fp5-qwcf> (advisory)
- <https://github.com/ansible/ansible> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/ansible/PYSEC-2020-5.yaml> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DKPA4KC3OJSUFASUYMG66HKJE7ADNGFW> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MRRYUU5ZBLPBXCYG6CFP35D64NP2UB2S> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/WQVOQD4VAIXXTVQAJKTN7NUGTJFE2PCB> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DKPA4KC3OJSUFASUYMG66HKJE7ADNGFW/> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/WQVOQD4VAIXXTVQAJKTN7NUGTJFE2PCB/> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MRRYUU5ZBLPBXCYG6CFP35D64NP2UB2S/> (web)

## Sources

- CVE List: [CVE-2020-1733](https://www.cve.org/CVERecord?id=CVE-2020-1733), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-g4mq-6fp5-qwcf](https://github.com/advisories/GHSA-g4mq-6fp5-qwcf), CC-BY-4.0, modified 2024-11-27
- NVD: [CVE-2020-1733](https://nvd.nist.gov/vuln/detail/CVE-2020-1733), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2020-5](https://osv.dev/vulnerability/PYSEC-2020-5), CC-BY-4.0, modified 2023-11-08

---

Page: https://cve.day/CVE-2020-1733 · Whole record: https://cve.day/CVE-2020-1733.json · Rebuilt by cve.day 2026-11-25T22:57:51.130Z
