
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2020-1740 is a security vulnerability discovered in Ansible Engine affecting the Ansible Vault feature. The vulnerability was found when using Ansible Vault for editing encrypted files. When a user executes 'ansible-vault edit', another user on the same computer can read both the old and new secrets, as they are created in a temporary file with mkstemp. The vulnerability affects all versions in Ansible Engine 2.7.x, 2.8.x, and 2.9.x branches, as well as Ansible Tower versions up to 3.4.5, 3.5.5, and 3.6.3 (Red Hat Bug).
The vulnerability occurs in the VaultEditor._edit_file_helper() method where a temporary file is created using tempfile.mkstemp(). The issue arises because the returned file descriptor is closed and VaultEditor.write_data() is called to write the existing secret in the file. This method deletes the file before recreating it insecurely, allowing a malicious user to create the file with permissions that grant them access to the file after the unlink (GitHub Issue). The vulnerability has been assigned a CVSS v3.1 base score of 4.7 (Medium) by NIST with vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N (NVD).
The vulnerability allows local users on the same system to read sensitive information, including both old and new secrets, when another user is editing encrypted files using the ansible-vault edit command. This could lead to unauthorized access to encrypted credentials and sensitive configuration data (Red Hat Bug).
The vulnerability was fixed in Ansible Engine versions 2.7.17, 2.8.11, and 2.9.7. Until systems can be updated, the only mitigation is to avoid using the 'edit' option from the ansible-vault command line tool (Red Hat Bug). Various distributions have released security updates, including Debian, Fedora, and Gentoo (Debian LTS, Fedora Update, Gentoo Security).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."