CVE-2020-1740 Exposure of Sensitive Information to an Unauthorized Actor and Insecure Temporary File in Ansible
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.
Which versions are affected by CVE-2020-1740?
7 open source packages ship an affected version, including ansible. It affects 6 products.
| Package | Affected | Fixed in |
|---|---|---|
ansible PyPI | All versions | 2.7.17, 2.8.9, 2.9.6 |
ansible PyPI | All versions | 2.7.17 |
ansible PyPI | All versions | 2.7.17 |
ansible PyPI | From 2.8.0a1 | 2.8.11 |
ansible PyPI | From 2.8.0a1 | 2.8.11 |
ansible PyPI | From 2.9.0a1 | 2.9.7 |
1 more packages
ansible PyPI | From 2.9.0a1 | 2.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.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as ALPINE-CVE-2020-1740, DEBIAN-CVE-2020-1740, GHSA-vcg8-98q8-g7mj, PYSEC-2020-12, UBUNTU-CVE-2020-1740.