CVE-2020-1733: Insecure Temporary File in Ansible
Summary
CVE-2020-1733: Ansible vulnerable to Exposure of Resource to Wrong Sphere and Insecure Temporary File. Affects ansible across 3 version ranges.
< 2.7.17
>= 2.8.0a1, < 2.8.11
>= 2.9.0a1, < 2.9.7
Fixed in 2.7.17, 2.8.11 or 2.9.7, depending on the release line you run. How to fix ↓
Also tracked for
- ansible · Alpine:v3.10
The same CVE-2020-1733 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Ansible is an open-source automation tool that allows users to automate tasks such as configuration management, application deployment, and orchestration. It is widely used in the IT industry for managing infrastructure and deploying applications. However, Ansible Engine versions 2.7.17 and prior, 2.8.9 and prior, and 2.9.6 and prior are vulnerable to an insecure temporary file vulnerability.
Vulnerability Detail
The vulnerability, identified as CVE-2020-1733, is a race condition flaw in Ansible Engine. When running a playbook with an unprivileged become user, Ansible creates a temporary directory in /var/tmp. However, this directory is created with 'umask 77 && mkdir -p <dir>', which does not fail if the directory already exists and is owned by another user. An attacker can exploit this flaw to gain control of the become user by retrieving the target directory through '/proc/<pid>/cmdline'. This vulnerability has a CVSS score of 5.0, indicating a moderate severity level.
How To Fix
Latest published version: 14.5.0 as of 22 Oct 2026
pip install --upgrade "ansible==14.5.0"
Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.
If you can't move to the latest
The minimum fixed version depends on the release line you run.
-
< 2.7.172.7.17pip install --upgrade "ansible==2.7.17" -
>= 2.8.0a1, < 2.8.112.8.11pip install --upgrade "ansible==2.8.11" -
>= 2.9.0a1, < 2.9.72.9.7pip install --upgrade "ansible==2.9.7"
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
There is no known workaround for this vulnerability. It is recommended to upgrade to the fixed versions as soon as possible.
Conclusion
In conclusion, the CVE-2020-1733 vulnerability in Ansible Engine exposes a resource to the wrong sphere and allows for an insecure temporary file. It is important to upgrade to the fixed versions of Ansible Engine (2.7.18, 2.8.10, or 2.9.7) to mitigate the risk of unauthorized access and privilege escalation. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for ansible →
FAQ
Ansible is an open-source automation tool used for configuration management, application deployment, and orchestration.
This vulnerability allows an attacker to gain control of the become user in Ansible, potentially leading to unauthorized access and privilege escalation.
You can use the Vulert Playground at Vulert Scanner to check if your Ansible installation is affected by this vulnerability. No signup is required.
There are no known workarounds for this vulnerability. It is recommended to upgrade to the fixed versions.
You can find more information about this vulnerability in the official GitHub advisory at https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/04/GHSA-g4mq-6fp5-qwcf/GHSA-g4mq-6fp5-qwcf.json
References
Related vulnerabilities
Recent vulnerabilities recorded for ansible.