CVE-2021-27851
Local privilege escalation in GNU Guix via guix-daemon and '--keep-failed'
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
0Exploited in Wild
-Decision
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
CVSS Scores
SSVC
- Decision:-
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
References (2)
URL | Tag | Source |
---|
URL | Date | SRC |
---|
URL | Date | SRC |
---|---|---|
https://bugs.gnu.org/47229 | 2022-07-29 | |
https://guix.gnu.org/en/blog/2021/risk-of-local-privilege-escalation-via-guix-daemon | 2022-07-29 |
URL | Date | SRC |
---|
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
|