CVE-2020-1733: Insecure Temporary File in Ansible

ansible Updated 02 Oct 2025

Summary

20/04/2021
Yes i
Low
5.0

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

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.

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

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.17 2.7.17
    pip install --upgrade "ansible==2.7.17"
  • >= 2.8.0a1, < 2.8.11 2.8.11
    pip install --upgrade "ansible==2.8.11"
  • >= 2.9.0a1, < 2.9.7 2.9.7
    pip 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 →

Share this vulnerability

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.

Related vulnerabilities

Recent vulnerabilities recorded for ansible.

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.17 2.7.17
    pip install --upgrade "ansible==2.7.17"
  • >= 2.8.0a1, < 2.8.11 2.8.11
    pip install --upgrade "ansible==2.8.11"
  • >= 2.9.0a1, < 2.9.7 2.9.7
    pip 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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback