What’s Vulnerable › Vulnerabilities
CVE-2021-45707
- Severity: critical (CVSS 9.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.7% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2021-12-27 · updated 2026-06-17
- Weakness: CWE-787
Description
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.
Affected products
- Nix Project Nix: from 0.16.0 before 0.20.2; from 0.21.0 before 0.21.2; from 0.22.0 before 0.22.2 — fixed in 0.20.2, 0.21.2, 0.22.2
How to fix
Upgrade to a fixed version: Nix Project Nix 0.20.2, 0.21.2, 0.22.2. Check the vendor advisory for mitigations.
References
- https://github.com/advisories/GHSA-wgrg-5h56-jg27
- https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/nix/RUSTSEC-2021-0119.md
- https://rustsec.org/advisories/RUSTSEC-2021-0119.html
- https://github.com/advisories/GHSA-wgrg-5h56-jg27
- https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/nix/RUSTSEC-2021-0119.md
- https://rustsec.org/advisories/RUSTSEC-2021-0119.html
Get alerted when CVE-2021-45707 or the next vulnerability affects your stack