CVE-2020-1740 Exposure of Sensitive Information to an Unauthorized Actor and Insecure Temporary File in Ansible

Low 3.9 Published Updated

Local attackers can read sensitive secrets from temporary files during Ansible Vault editing due to insecure file handling.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2020-1740?

CVE-2020-1740 is a low-severity vulnerability in Debian Debian Linux, published on 16 Mar 2020. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

A flaw was found in Ansible Engine when using Ansible Vault for editing encrypted files. When a user executes "ansible-vault edit", another user on the same computer can read the old and new secret, as it is created in a temporary file with mkstemp and the returned file descriptor is closed and the method write_data is called to write the existing secret in the file. This method will delete the file before recreating it insecurely. All versions in 2.7.x, 2.8.x and 2.9.x branches are believed to be vulnerable.

Weakness: CWE-200, CWE-377

Which versions are affected by CVE-2020-1740?

7 open source packages ship an affected version, including ansible. It affects 6 products.

PackageAffectedFixed in
ansible PyPIAll versions2.7.17, 2.8.9, 2.9.6
ansible PyPIAll versions2.7.17
ansible PyPIAll versions2.7.17
ansible PyPIFrom 2.8.0a12.8.11
ansible PyPIFrom 2.8.0a12.8.11
ansible PyPIFrom 2.9.0a12.9.7
1 more packages
ansible PyPIFrom 2.9.0a12.9.7

Products include Debian Debian Linux, Fedoraproject Fedora, Redhat Ansible, Redhat Ansible Tower, Redhat Cloudforms Management Engine, Redhat Openstack.

How do I fix CVE-2020-1740?

Upgrade ansible to a fixed version for your release line: 2.7.17, 2.8.9, 2.9.6 or 2.8.11.

Is CVE-2020-1740 being exploited?

There is no known exploitation of CVE-2020-1740 in the wild and no public exploit code.

All Debian Debian Linux vulnerabilities

Sources

Also known as ALPINE-CVE-2020-1740, DEBIAN-CVE-2020-1740, GHSA-vcg8-98q8-g7mj, PYSEC-2020-12, UBUNTU-CVE-2020-1740.

Is CVE-2020-1740 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free