{"id":"CVE-2024-38531","state":"PUBLISHED","title":"Nix sandbox escape","description":"Nix is a package manager for Linux and other Unix systems that makes package management reliable and reproducible. A build process has access to and can change the permissions of the build directory. After creating a setuid binary in a globally accessible location, a malicious local user can assume the permissions of a Nix daemon worker and hijack all future builds. This issue was patched in version(s) 2.23.1, 2.22.2, 2.21.3, 2.20.7, 2.19.5 and 2.18.4.","publishedAt":"2024-06-28T13:18:58.604Z","updatedAt":"2024-08-02T04:12:25.386Z","severity":{"score":3.6,"label":"Low","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:L","source":"GitHub_M"},"assigner":"GitHub_M","products":["NixOS nix"],"affected":[{"vendor":"NixOS","product":"nix","versions":[{"version":">= 2.23.0, < 2.23.1","status":"affected"},{"version":">= 2.22.0, < 2.22.2","status":"affected"},{"version":">= 2.21.0, < 2.21.3","status":"affected"},{"version":">= 2.20.0, < 2.20.7","status":"affected"},{"version":">= 2.19.0, < 2.19.5","status":"affected"},{"version":">= 2.18.0, < 2.18.4","status":"affected"}]}],"references":["https://github.com/NixOS/nix/security/advisories/GHSA-q82p-44mg-mgh5","https://github.com/NixOS/nix/pull/10501"],"weaknesses":["CWE-278"],"ingestedAt":"2026-10-29T20:07:39.287Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/38xxx/CVE-2024-38531.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2024-38531","state":"PUBLISHED","datePublished":"2024-06-28T13:18:58.604Z","dateUpdated":"2024-08-02T04:12:25.386Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2024-06-18T16:37:02.729Z"},"containers":{"cna":{"title":"Nix sandbox escape","descriptions":[{"lang":"en","value":"Nix is a package manager for Linux and other Unix systems that makes package management reliable and reproducible. A build process has access to and can change the permissions of the build directory. After creating a setuid binary in a globally accessible location, a malicious local user can assume the permissions of a Nix daemon worker and hijack all future builds. This issue was patched in version(s) 2.23.1, 2.22.2, 2.21.3, 2.20.7, 2.19.5 and 2.18.4."}],"affected":[{"vendor":"NixOS","product":"nix","versions":[{"version":">= 2.23.0, < 2.23.1","status":"affected"},{"version":">= 2.22.0, < 2.22.2","status":"affected"},{"version":">= 2.21.0, < 2.21.3","status":"affected"},{"version":">= 2.20.0, < 2.20.7","status":"affected"},{"version":">= 2.19.0, < 2.19.5","status":"affected"},{"version":">= 2.18.0, < 2.18.4","status":"affected"}]}],"references":[{"url":"https://github.com/NixOS/nix/security/advisories/GHSA-q82p-44mg-mgh5","name":"https://github.com/NixOS/nix/security/advisories/GHSA-q82p-44mg-mgh5","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/NixOS/nix/pull/10501","name":"https://github.com/NixOS/nix/pull/10501","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"HIGH","attackVector":"LOCAL","availabilityImpact":"LOW","baseScore":3.6,"baseSeverity":"LOW","confidentialityImpact":"NONE","integrityImpact":"LOW","privilegesRequired":"LOW","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:L","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-278","lang":"en","description":"CWE-278: Insecure Preserved Inherited Permissions","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2024-06-28T13:18:58.604Z"},"source":{"advisory":"GHSA-q82p-44mg-mgh5","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2024-07-05T15:26:22.607904Z","id":"CVE-2024-38531","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-07-08T19:37:03.431Z"}},{"title":"CVE Program Container","references":[{"url":"https://github.com/NixOS/nix/security/advisories/GHSA-q82p-44mg-mgh5","name":"https://github.com/NixOS/nix/security/advisories/GHSA-q82p-44mg-mgh5","tags":["x_refsource_CONFIRM","x_transferred"]},{"url":"https://github.com/NixOS/nix/pull/10501","name":"https://github.com/NixOS/nix/pull/10501","tags":["x_refsource_MISC","x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T04:12:25.386Z"}}]}}}