Vulnerabilities / CVE-2021-45707

critical

CVE-2021-45707

An issue was discovered in the nix crate 0.16.0 and later before 0.20. ...

Published Modified CWE 787
In the Trivy database since at least 24 Oct 2026, 07:11 UTCWhen it arrived before that build is not recorded.

Severity by source

NVD9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GHSA6.7CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

Trivy's own label is CRITICAL. Rated critical by NVD, Azure Linux. Rated lower by GHSA (medium), Ubuntu (medium).

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 packages and fixed versions

SourcePackageFixed in
Azure Linux 3.0rpm-ostree0:2024.4-1.azl3
cargo::GitHub Security Advisory Rustnix0.20.2, 0.21.2, 0.22.2
chainguardnsexec, toda0.1.7-r2 and 1 more
debian 11rust-nixno fix listed
debian 12rust-nix0.23.0-1
debian 13rust-nix0.23.0-1
debian 14rust-nix0.23.0-1
echorust-nix0.23.0-1
ubuntu 20.04-ESMrust-nixno fix listed
ubuntu 22.04rust-nixno fix listed
ubuntu 24.04rust-nixno fix listed
ubuntu 26.04rust-nixno fix listed
Show all 14 entries from 13 sources
SourcePackageFixed in
Azure Linux 3.0rpm-ostree0:2024.4-1.azl3
cargo::GitHub Security Advisory Rustnix0.20.2, 0.21.2, 0.22.2
chainguardnsexec0.1.7-r2
chainguardtoda0.3.0-r0
debian 11rust-nixno fix listed
debian 12rust-nix0.23.0-1
debian 13rust-nix0.23.0-1
debian 14rust-nix0.23.0-1
echorust-nix0.23.0-1
ubuntu 20.04-ESMrust-nixno fix listed
ubuntu 22.04rust-nixno fix listed
ubuntu 24.04rust-nixno fix listed
ubuntu 26.04rust-nixno fix listed
ubuntu 26.10rust-nixno fix listed

References

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.