Nix and Lix Stack-to-Heap Overflow Vulnerability in NAR Parser Allowing Privilege Escalation

Vulnerability

A stack-to-heap overflow vulnerability has been identified in Nix versions prior to 2.34.7 and Lix versions prior to 2.95.2. The issue arises from unbounded recursion in the NAR (Nix Archive) parser, which can lead to a stack overflow that overwrites heap memory. This vulnerability can be exploited to execute arbitrary code as the Nix daemon, which runs as root in multi-user installations, if certain conditions are met. The vulnerability affects all users who can connect to the Nix daemon, with the default configuration allowing all users.

Impact

Exploitation of this vulnerability could lead to arbitrary code execution as the Nix daemon user, with potential bypass of ASLR hardening, allowing for exploitation of the stack-to-heap overflow.

Remediation

Users are advised to upgrade to Nix versions 2.34.7, 2.33.6, 2.32.8, 2.31.5, 2.30.5, 2.29.4, or 2.28.7, and to Lix versions 2.95.2, 2.94.2, or 2.93.4.

Added: May 5, 2026, 1:19 AM
Updated: May 5, 2026, 1:19 AM

Vulnerability Rating

Custom Algorithm
spread
2.4
impact
10.0
exploitability
2.7
remediation
7.7
relevance
7.5
threat
0.0
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.