{"schemaVersion":3,"id":"CVE-2021-45707","aliases":["UBUNTU-CVE-2021-45707","DEBIAN-CVE-2021-45707","GHSA-76w9-p8mg-j927","GHSA-wgrg-5h56-jg27","RUSTSEC-2021-0119","CGA-r235-rp7x-5r48","CGA-r78w-99vr-836c","CGA-vjc8-288c-2pwp"],"status":"published","duplicateOf":null,"title":null,"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.","dates":{"published":"2021-12-26T21:48:02.000Z","modified":"2024-08-04T04:47:02.459Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":9.8,"severity":"critical","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":10,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":10,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Crates.io","score":6.7,"severity":"medium","vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","exploitability":2.1,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false},{"version":"2.0","versionLabel":"v2.0","source":"NVD","score":7.5,"severity":"high","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Chainguard","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":10,"impact":9.8,"computed":true}]},"epss":{"probability":0.01704,"percentile":0.76948,"severity":"low","asOf":"2026-10-20T00:00:00.000Z","change":{"pp":0.05399999999999988,"baselineDate":"2026-09-20T00:00:00.000Z","baselineScore":0.0165},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01704,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.01704,"percentile":0.76948}],"last30":[{"date":"2026-09-20T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.0165,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01704,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.01704,"percentile":0.76948}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-787","name":"Out-of-bounds Write","description":"The product writes data past the end, or before the beginning, of the intended buffer.","type":"weakness","status":"Draft","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/787.html"}],"affected":[{"vendor":"chainguard","product":"nsexec","name":"nsexec","label":"nsexec","ecosystem":"Chainguard","cpePart":null,"purl":"pkg:apk/chainguard/nsexec","purlType":"apk","versions":[{"text":"< 0.1.7-r2","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 0.1.7-r2","eol":null,"hubHref":null},{"vendor":"chainguard","product":"toda","name":"toda","label":"toda","ecosystem":"Chainguard","cpePart":null,"purl":"pkg:apk/chainguard/toda","purlType":"apk","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null},{"text":"< 0.3.0-r0","noFixRecorded":false,"fixedIn":null}],"versionsText":"All versions (No fix recorded) | < 0.3.0-r0","eol":null,"hubHref":null},{"vendor":"Crates.Io","product":"nix","name":"nix","label":"nix","ecosystem":"Crates.Io","cpePart":null,"purl":"pkg:cargo/nix","purlType":"cargo","versions":[{"text":"≥ 0.16.0, < 0.20.2","noFixRecorded":false,"fixedIn":null},{"text":"≥ 0.21.0, < 0.21.2","noFixRecorded":false,"fixedIn":null},{"text":"≥ 0.22.0, < 0.22.2","noFixRecorded":false,"fixedIn":null},{"text":"≥ 0.23.0-0, < 0.23.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 0.16.0, < 0.20.2 | ≥ 0.21.0, < 0.21.2 | ≥ 0.22.0, < 0.22.2 | ≥ 0.23.0-0, < 0.23.0","eol":{"isEol":null,"eolDate":null,"matchMethod":"name_exact","cycle":null,"product":{"name":"nix","label":"nix","category":"app"}},"hubHref":null},{"vendor":"debian","product":"rust-nix","name":"rust-nix","label":"rust-nix","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/rust-nix","purlType":"deb","versions":[{"text":"< 0.23.0-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 0.23.0-1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"rust-nix","name":"rust-nix","label":"rust-nix","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/rust-nix","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"nix_project","product":"nix","name":"nix","label":"nix","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 0.16.0, < 0.20.2","noFixRecorded":false,"fixedIn":null},{"text":"≥ 0.21.0, < 0.21.2","noFixRecorded":false,"fixedIn":null},{"text":"≥ 0.22.0, < 0.22.2","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 0.16.0, < 0.20.2 | ≥ 0.21.0, < 0.21.2 | ≥ 0.22.0, < 0.22.2","eol":{"isEol":null,"eolDate":null,"matchMethod":"name_exact","cycle":null,"product":{"name":"nix","label":"nix","category":"app"}},"hubHref":"/vendor/nix_project/nix"}],"affectedCount":6,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0119.html","label":"rustsec.org/advisories/RUSTSEC-2021-0119.html","hostname":"rustsec.org","tags":["X Refsource MISC","REPORT","WEB","Advisory","Issue Tracking","Third Party Advisory"]},{"url":"https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/nix/RUSTSEC-2021-0119.md","label":"raw.githubusercontent.com/rustsec/advisory-db/main/crates/nix/RUSTSEC-2021-0119.md","hostname":"raw.githubusercontent.com","tags":["X Refsource MISC","REPORT","WEB","Third Party Advisory","Advisory"]},{"url":"https://github.com/advisories/GHSA-wgrg-5h56-jg27","label":"github.com/advisories/GHSA-wgrg-5h56-jg27","hostname":"github.com","tags":["X Refsource MISC","Advisory","Third Party Advisory"]},{"url":"https://ubuntu.com/security/CVE-2021-45707","label":"ubuntu.com/security/CVE-2021-45707","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-45707","label":"www.cve.org/CVERecord?id=CVE-2021-45707","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-45707","label":"security-tracker.debian.org/tracker/CVE-2021-45707","hostname":"security-tracker.debian.org","tags":["Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-45707","label":"nvd.nist.gov/vuln/detail/CVE-2021-45707","hostname":"nvd.nist.gov","tags":["Advisory","Oval"]},{"url":"https://github.com/nix-rust/nix/issues/1541","label":"github.com/nix-rust/nix/issues/1541","hostname":"github.com","tags":["WEB","REPORT"]},{"url":"https://github.com/nix-rust/nix","label":"github.com/nix-rust/nix","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://crates.io/crates/nix","label":"crates.io/crates/nix","hostname":"crates.io","tags":["PACKAGE"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":["CGA-9J3M-M6MX-XFP9"]},"timeline":[{"kind":"published","date":"2021-12-26T21:48:02.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2024-08-04T04:47:02.459Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":70,"level":"high","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-21T10:37:59.412Z","stale":false,"partial":false}}