Skip to main content

CVE-2025-52993: CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') in NixOS Nix

Medium
VulnerabilityCVE-2025-52993cvecve-2025-52993cwe-362
Published: Fri Jun 27 2025 (06/27/2025, 00:00:00 UTC)
Source: CVE Database V5
Vendor/Project: NixOS
Product: Nix

Description

A race condition in the Nix, Lix, and Guix package managers enables changing the ownership of arbitrary files to the UID and GID of the build user (e.g., nixbld* or guixbuild*). This affects Nix before 2.24.15, 2.26.4, 2.28.4, and 2.29.1; Lix before 2.91.2, 2.92.2, and 2.93.1; and Guix before 1.4.0-38.0e79d5b.

AI-Powered Analysis

AILast updated: 06/27/2025, 13:56:52 UTC

Technical Analysis

CVE-2025-52993 is a race condition vulnerability classified under CWE-362, affecting the NixOS Nix package manager and related package managers Lix and Guix. The flaw arises from improper synchronization when concurrently accessing shared resources during build processes. Specifically, this race condition allows an attacker to manipulate the ownership of arbitrary files, changing them to the UID and GID of the build user accounts such as nixbld* or guixbuild*. These build users typically have elevated privileges within the build environment, and unauthorized changes to file ownership can lead to privilege escalation or unauthorized access to sensitive files. The affected versions include Nix versions prior to 2.24.15, 2.26.4, 2.28.4, and 2.29.1; Lix versions before 2.91.2, 2.92.2, and 2.93.1; and Guix versions before 1.4.0-38.0e79d5b. The vulnerability has a CVSS v3.1 base score of 5.6, indicating a medium severity level. The vector indicates that exploitation requires local access (AV:L), high attack complexity (AC:H), no privileges required (PR:N), no user interaction (UI:N), and the impact affects confidentiality, integrity, and availability at a low level but with a scope change (S:C). No known exploits are currently reported in the wild. The vulnerability could be exploited by an attacker with local access to the build environment, potentially allowing unauthorized file ownership changes that could be leveraged for further attacks or disruption of build processes.

Potential Impact

For European organizations using Nix, Lix, or Guix package managers in their development or production environments, this vulnerability poses a risk of unauthorized privilege escalation and potential disruption of software supply chains. Since these package managers are often used in DevOps pipelines and continuous integration systems, exploitation could lead to compromised build artifacts or unauthorized access to sensitive files. This can undermine the integrity of software deployments and potentially introduce malicious code or backdoors. The impact extends to confidentiality, integrity, and availability of build environments and artifacts, which are critical for maintaining trust in software supply chains. Organizations in sectors with stringent compliance requirements, such as finance, healthcare, and critical infrastructure, may face increased risk if build environments are compromised. Additionally, the medium severity and requirement for local access mean that insider threats or attackers who have gained initial footholds could exploit this vulnerability to escalate privileges or move laterally within networks.

Mitigation Recommendations

European organizations should prioritize upgrading affected package managers to the patched versions: Nix 2.24.15, 2.26.4, 2.28.4, or 2.29.1 and later; Lix 2.91.2, 2.92.2, or 2.93.1 and later; and Guix 1.4.0-38.0e79d5b or later. Until patches are applied, organizations should restrict local access to build environments to trusted personnel only and implement strict access controls and monitoring on build user accounts (nixbld*, guixbuild*). Employing file integrity monitoring on build directories can help detect unauthorized ownership changes. Additionally, segregating build environments from general user environments and enforcing the principle of least privilege can reduce the attack surface. Incorporating runtime monitoring to detect anomalous file ownership changes or unexpected build user activity can provide early warning of exploitation attempts. Finally, organizations should review and harden their DevOps pipeline security, including secure credential management and audit logging, to detect and respond to suspicious activities promptly.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
mitre
Date Reserved
2025-06-23T00:00:00.000Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 685ea2a26f40f0eb726349de

Added to database: 6/27/2025, 1:54:42 PM

Last enriched: 6/27/2025, 1:56:52 PM

Last updated: 8/21/2025, 7:24:16 AM

Views: 48

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats