// For flags

CVE-2020-1733

ansible: insecure temporary directory when running become_user from become directive

Severity Score

5.0
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

1
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

A race condition flaw was found in Ansible Engine 2.7.17 and prior, 2.8.9 and prior, 2.9.6 and prior when running a playbook with an unprivileged become user. When Ansible needs to run a module with become user, the temporary directory is created in /var/tmp. This directory is created with "umask 77 && mkdir -p <dir>"; this operation does not fail if the directory already exists and is owned by another user. An attacker could take advantage to gain control of the become user as the target directory can be retrieved by iterating '/proc/<pid>/cmdline'.

Se encontró un fallo de condición de carrera en Ansible Engine versiones 2.7.17 y anteriores, 2.8.9 y anteriores, 2.9.6 y anteriores, cuando se ejecuta un playbook con un usuario convertido a no privilegiado. Cuando Ansible necesita ejecutar un módulo con un usuario convertido, el directorio temporal es creado en /var/tmp. Este directorio se crea con "umask 77 &amp;&amp; mkdir -p (dir)"; Esta operación no tiene un fallo si el directorio ya existe y es propiedad de otro usuario. Un atacante podría tomar ventaja para tomar el control del usuario convertido, ya que el directorio de destino puede ser recuperado iterando "/proc//cmdline".

A race condition flaw was found in Ansible Engine when running a playbook with an unprivileged become user. When Ansible needs to run a module with become user, the temporary directory is created in /var/tmp. This directory is created with "umask 77 && mkdir -p <dir>"; this operation does not fail if the directory already exists and is owned by another user. An attacker could take advantage to gain control of the become user as the target directory can be retrieved by iterating '/proc/<pid>/cmdline'.

*Credits: N/A
CVSS Scores
Attack Vector
Local
Attack Complexity
High
Privileges Required
Low
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
Low
Attack Vector
Local
Attack Complexity
High
Authentication
None
Confidentiality
Partial
Integrity
Partial
Availability
Partial
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2019-11-27 CVE Reserved
  • 2020-03-11 CVE Published
  • 2023-11-08 EPSS Updated
  • 2024-08-04 CVE Updated
  • 2024-08-04 First Exploit
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
CWE
  • CWE-362: Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
  • 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.16
Search vendor "Redhat" for product "Ansible" and version " <= 2.7.16"
-
Affected
Redhat
Search vendor "Redhat"
Ansible
Search vendor "Redhat" for product "Ansible"
>= 2.8.0 < 2.8.8
Search vendor "Redhat" for product "Ansible" and version " >= 2.8.0 < 2.8.8"
-
Affected
Redhat
Search vendor "Redhat"
Ansible
Search vendor "Redhat" for product "Ansible"
>= 2.9.0 <= 2.9.5
Search vendor "Redhat" for product "Ansible" and version " >= 2.9.0 <= 2.9.5"
-
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
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
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