Live threats

All CVEs / Nix Project

CVE-2021-45707Nix Project Nix

Critical 9.8 No auth needed

Priority
74
CVSS 3.1
9.8
EPSS
1.7%
probability of exploitation in 30 days · percentile 78
Auth required
No
Published
Dec 27, 2021
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-787
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

What happens

An issue was discovered in the nix crate 0.16.0 and later before 0.20.2, 0.21.x before 0.21.2, and 0.22.x before 0.22.2 for Rust. unistd::getgrouplist has an out-of-bounds write if a user is in more than 16 /etc/groups groups.

Original NVD text.

What to do

  1. Apply the vendor's security update for Nix.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
crates.io nix ≥ 0.16.0 < 0.20.2 0.20.2 cargo update -p nix --precise 0.20.2
crates.io nix ≥ 0.21.0 < 0.21.2 0.21.2 cargo update -p nix --precise 0.21.2
crates.io nix ≥ 0.22.0 < 0.22.2 0.22.2 cargo update -p nix --precise 0.22.2
crates.io nix ≥ 0.16.0 < 0.20.2 0.20.2 cargo update -p nix --precise 0.20.2
crates.io nix ≥ 0.21.0 < 0.21.2 0.21.2 cargo update -p nix --precise 0.21.2
crates.io nix ≥ 0.22.0 < 0.22.2 0.22.2 cargo update -p nix --precise 0.22.2
crates.io nix ≥ 0.16.0 < 0.20.2 0.20.2 cargo update -p nix --precise 0.20.2
crates.io nix ≥ 0.21.0-0 < 0.21.2 0.21.2 cargo update -p nix --precise 0.21.2
crates.io nix ≥ 0.22.0-0 < 0.22.2 0.22.2 cargo update -p nix --precise 0.22.2
crates.io nix ≥ 0.23.0-0 < 0.23.0 0.23.0 cargo update -p nix --precise 0.23.0

Per OSV / GitHub Advisories (GHSA-76w9-p8mg-j927, GHSA-wgrg-5h56-jg27, RUSTSEC-2021-0119). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
nix_projectnix≥ 0.16.0 < 0.20.2
nix_projectnix≥ 0.21.0 < 0.21.2
nix_projectnix≥ 0.22.0 < 0.22.2

Official sources

References

Links published by the sources. Open them with care.