CVE-2021-45707 json
Out-of-bounds Write in nix
published 2021-09-27 5 y ago modified 2026-09-10 1 mo ago also GHSA-76w9-p8mg-j927 , GHSA-wgrg-5h56-jg27 , RUSTSEC-2021-0119 , EUVD-2022-0497
- cvss
- 9.8
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.7%
- EPSS 1.7% chance of exploitation in 30 days, percentile 77%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- crates.io nix 0.20.2, 0.21.2, 0.22.2, 0.23.0
- nix_project nix 0.20.2, 0.21.2, 0.22.2
- rust-nix Debian 14, Debian 13, Debian 12 0.23.0-1
debian advisories DEBIAN-CVE-2021-45707
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-45707 updated cvss 8.6
rust-nix: unistd:: getgrouplist has an out-of-bounds write
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
1.69% chance of exploitation in the next 30 days, higher than 77% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
| GitHub | 3.1 | 6.7 | CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| crates.io | nix | >=0.16.0, <0.20.2 >=0.21.0, <0.21.2 >=0.22.0, <0.22.2 >=0.21.0-0, <0.21.2 >=0.22.0-0, <0.22.2 >=0.23.0-0, <0.23.0 |
0.20.2 0.21.2 0.22.2 0.23.0 |
Classification
- Weakness
-
- CWE-787 Out-of-bounds Write
References
-
rustsec.org
/advisories/RUSTSEC-2021-0119.html
web, issue-tracking, third-party-advisory, advisory
-
raw.githubusercontent.com
/rustsec/advisory-db/main/crates/nix/RUSTSEC-2021-0119.md
web, third-party-advisory
-
github.com
/advisories/GHSA-wgrg-5h56-jg27
advisory, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-45707
advisory
-
github.com
/nix-rust/nix/issues/1541
web, report
-
github.com
/nix-rust/nix
package
-
crates.io
/crates/nix
package
Sources
- CVE List CVE-2021-45707
- GitHub Advisory GHSA-76w9-p8mg-j927
- GitHub Advisory GHSA-wgrg-5h56-jg27
- NVD CVE-2021-45707
- OSV RUSTSEC-2021-0119
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.