// For flags

CVE-2021-27851

Local privilege escalation in GNU Guix via guix-daemon and '--keep-failed'

Severity Score

5.5
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

A security vulnerability that can lead to local privilege escalation has been found in ’guix-daemon’. It affects multi-user setups in which ’guix-daemon’ runs locally. The attack consists in having an unprivileged user spawn a build process, for instance with `guix build`, that makes its build directory world-writable. The user then creates a hardlink to a root-owned file such as /etc/shadow in that build directory. If the user passed the --keep-failed option and the build eventually fails, the daemon changes ownership of the whole build tree, including the hardlink, to the user. At that point, the user has write access to the target file. Versions after and including v0.11.0-3298-g2608e40988, and versions prior to v1.2.0-75109-g94f0312546 are vulnerable.

Se ha encontrado una vulnerabilidad de seguridad en "guix-daemon" que puede conllevar a una escalada de privilegios local. Afecta a las configuraciones multiusuario en las que "guix-daemon" se ejecuta localmente. El ataque consiste en hacer que un usuario no privilegiado genere un proceso de compilación, por ejemplo con "guix build", que hace que su directorio de compilación sea world-writable. Luego, el usuario crea un vínculo físico a un archivo de propiedad root tal y como /etc/shadow en ese directorio de compilación. Si el usuario pasó la opción --keep-failed y finalmente se produce un fallo en la compilación, el demonio cambia la propiedad de todo el árbol de compilación, incluido el enlace físico, al usuario. En ese momento, el usuario tiene acceso de escritura al archivo de destino. Las versiones posteriores a la v0.11.0-3298-g2608e40988 y las versiones anteriores a la v1.2.0-75109-g94f0312546 son vulnerables

*Credits: Nathan Nye of WhiteBeam Security
CVSS Scores
Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None
Attack Vector
Local
Attack Complexity
Low
Authentication
None
Confidentiality
None
Integrity
Partial
Availability
None
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2021-03-01 CVE Reserved
  • 2021-04-26 CVE Published
  • 2023-03-08 EPSS Updated
  • 2024-09-17 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-59: Improper Link Resolution Before File Access ('Link Following')
  • CWE-264: Permissions, Privileges, and Access Controls
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Gnu
Search vendor "Gnu"
Guix
Search vendor "Gnu" for product "Guix"
>= 0.11.0 < 1.2.0
Search vendor "Gnu" for product "Guix" and version " >= 0.11.0 < 1.2.0"
-
Affected