CVE-2020-1740

ansible: secrets readable after ansible-vault edit

Published Mar 16, 2020 CVSS 3.1 · 3.9 Low EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-2202-1 ansible security update
Debian DSA Debian DSA DSA-4950-1 ansible security update
EUVD EUVD EUVD-2020-0005 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.
Github GHSA Github GHSA GHSA-vcg8-98q8-g7mj Exposure of Sensitive Information to an Unauthorized Actor and Insecure Temporary File in Ansible
History

No history.

Weaknesses

Sources

Status
PUBLISHED
Assigner
redhat
Published
Updated
Aug 4, 2024, 6:46 AM
Reserved
Nov 27, 2019, 12:00 AM
Status
Modified
Published
Mar 16, 2020, 4:15 PM
Modified
Jun 17, 2026, 3:02 AM
Severity
Low
Public date
Feb 18, 2020, 12:00 AM