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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.0
- **CVSS:** 5.0 (v3.1, CNA) `CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:L`
- **CVSS metrics:** Attack vector: Local; Attack complexity: High; Privileges required: Low; User interaction: Required; Scope: Changed (impact reaches other components); Confidentiality impact: Low; Integrity impact: Low; Availability impact: Low
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.40% (percentile 26, 2026-11-26)
- **CWE:** CWE-377
- **Aliases:** GHSA-g4mq-6fp5-qwcf, PYSEC-2020-5
- **Published:** 2020-03-11T18:47:40.000Z
- **Modified:** 2026-06-17T03:02:17.740Z

## Who should check

- Projects that depend on PyPI package ansible (\< 2.7.17)
- Anyone running Red Hat Ansible 2.7.17 and prior; 2.8.9 and prior; 2.9.6 and prior

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

## Affected and fixed versions

- PyPI `ansible`: affected \< 2.7.17; fixed 2.7.17, 2.8.11, 2.9.7, 2.8.8, 2.9.6 (osv)
- Red Hat Ansible: 2.7.17 and prior; 2.8.9 and prior; 2.9.6 and prior (cvelist)

## Mitigation

- Upgrade ansible to one of 2.7.17, 2.8.11, 2.9.7, 2.8.8, 2.9.6 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2020-1733. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2020-1733.md
Affected: ansible < 2.7.17
Fixed in: 2.7.17, 2.8.11, 2.9.7, 2.8.8, 2.9.6

Steps:
1. Search this machine and project for ansible (PyPI), Red Hat Ansible: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2020-1733 being exploited?

There is no confirmed exploitation: CVE-2020-1733 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 0.40% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2020-1733?

Medium: CVSS 5.0 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2020-1733?

ansible \< 2.7.17.

### Is there a fix for CVE-2020-1733?

Yes. Fixed in 2.7.17, 2.8.11, 2.9.7, 2.8.8, 2.9.6. Upgrade ansible to one of 2.7.17, 2.8.11, 2.9.7, 2.8.8, 2.9.6 (or later in the same release line).

### How do I check if I'm affected by CVE-2020-1733?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

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

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2020-1733>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-g4mq-6fp5-qwcf> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2020-5> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2020-1733> · JSON: <https://flawdb.com/api/v1/entries/CVE-2020-1733>
