// For flags

CVE-2020-1740

ansible: secrets readable after ansible-vault edit

Severity Score

4.7
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

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.

Se detectó un fallo en Ansible Engine cuando se usa Ansible Vault para editar archivos cifrados. Cuando un usuario ejecuta "ansible-vault edit", otro usuario en la misma computadora puede leer el secreto antiguo y el nuevo, como es creado en un archivo temporal con mkstemp y el descriptor de archivo devuelto es cerrado y el método write_data es llamado para escribir el secreto existente en el archivo. Este método eliminará el archivo antes de volver a crearlo de forma no segura. Se cree todas las versiones en las derivaciones 2.7.x, 2.8.x y 2.9.x son vulnerables.

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.

*Credits: N/A
CVSS Scores
Attack Vector
Local
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None
Attack Vector
Local
Attack Complexity
High
Privileges Required
Low
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None
Attack Vector
Local
Attack Complexity
Medium
Authentication
None
Confidentiality
Partial
Integrity
None
Availability
None
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2019-11-27 CVE Reserved
  • 2020-03-16 CVE Published
  • 2023-03-08 EPSS Updated
  • 2024-08-04 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
  • CWE-377: Insecure Temporary File
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Redhat
Search vendor "Redhat"
Ansible
Search vendor "Redhat" for product "Ansible"
< 2.7.17
Search vendor "Redhat" for product "Ansible" and version " < 2.7.17"
-
Affected
Redhat
Search vendor "Redhat"
Ansible
Search vendor "Redhat" for product "Ansible"
>= 2.8.0 < 2.8.11
Search vendor "Redhat" for product "Ansible" and version " >= 2.8.0 < 2.8.11"
-
Affected
Redhat
Search vendor "Redhat"
Ansible
Search vendor "Redhat" for product "Ansible"
>= 2.9.0 < 2.9.7
Search vendor "Redhat" for product "Ansible" and version " >= 2.9.0 < 2.9.7"
-
Affected
Redhat
Search vendor "Redhat"
Ansible Tower
Search vendor "Redhat" for product "Ansible Tower"
<= 3.3.4
Search vendor "Redhat" for product "Ansible Tower" and version " <= 3.3.4"
-
Affected
Redhat
Search vendor "Redhat"
Ansible Tower
Search vendor "Redhat" for product "Ansible Tower"
>= 3.3.5 <= 3.4.5
Search vendor "Redhat" for product "Ansible Tower" and version " >= 3.3.5 <= 3.4.5"
-
Affected
Redhat
Search vendor "Redhat"
Ansible Tower
Search vendor "Redhat" for product "Ansible Tower"
>= 3.5.0 <= 3.5.5
Search vendor "Redhat" for product "Ansible Tower" and version " >= 3.5.0 <= 3.5.5"
-
Affected
Redhat
Search vendor "Redhat"
Ansible Tower
Search vendor "Redhat" for product "Ansible Tower"
>= 3.6.0 <= 3.6.3
Search vendor "Redhat" for product "Ansible Tower" and version " >= 3.6.0 <= 3.6.3"
-
Affected
Redhat
Search vendor "Redhat"
Cloudforms Management Engine
Search vendor "Redhat" for product "Cloudforms Management Engine"
5.0
Search vendor "Redhat" for product "Cloudforms Management Engine" and version "5.0"
-
Affected
Redhat
Search vendor "Redhat"
Openstack
Search vendor "Redhat" for product "Openstack"
13
Search vendor "Redhat" for product "Openstack" and version "13"
-
Affected
Debian
Search vendor "Debian"
Debian Linux
Search vendor "Debian" for product "Debian Linux"
8.0
Search vendor "Debian" for product "Debian Linux" and version "8.0"
-
Affected
Debian
Search vendor "Debian"
Debian Linux
Search vendor "Debian" for product "Debian Linux"
10.0
Search vendor "Debian" for product "Debian Linux" and version "10.0"
-
Affected
Fedoraproject
Search vendor "Fedoraproject"
Fedora
Search vendor "Fedoraproject" for product "Fedora"
30
Search vendor "Fedoraproject" for product "Fedora" and version "30"
-
Affected
Fedoraproject
Search vendor "Fedoraproject"
Fedora
Search vendor "Fedoraproject" for product "Fedora"
31
Search vendor "Fedoraproject" for product "Fedora" and version "31"
-
Affected
Fedoraproject
Search vendor "Fedoraproject"
Fedora
Search vendor "Fedoraproject" for product "Fedora"
32
Search vendor "Fedoraproject" for product "Fedora" and version "32"
-
Affected