CVE-2021-27851

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

MEDIUM
5.5
CVSS Score
Published: April 26, 2021 at 03:35 PM UTC
Updated: June 17, 2026 at 03:45 AM UTC
2 products affected across 2 vendorsGuixGuix

Using guix-daemon by GNU Guix?

Get instant alerts when new vulnerabilities affect guix-daemon - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.3%

Description

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

0.11.0 ≤ v < 1.2.0
Affected range stops below 1.2.0, so it looks safe — our inference, not a vendor statement
v ≥ v0.11.0-3298-g2608e40988v < v1.2.0-75109-g94f03125460.11.0-3298-g2608e40988
Affected range stops below v1.2.0-75109-g94f0312546, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (2)

x_refsource_MISCIssue TrackingMailing ListPatchVendor Advisory
https://bugs.gnu.org/47229

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
HIGH
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-264CWE-59

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card