{"answers":{"affected":"","exploited":"There is no known exploitation of CVE-2024-38531 in the wild and no public exploit code.","fix":"Upgrade to a fixed version.","what":"CVE-2024-38531 is a low-severity vulnerability in NixOS nix, published on 28 Jun 2024. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-38531 and fix it if it is affected.\n\nWhat it is: CVE-2024-38531 is a low-severity vulnerability in NixOS nix, published on 28 Jun 2024. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2024-38531 in the wild and no public exploit code.\n\nAffected product: NixOS nix. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-38531/ (Markdown: https://insights.sbomify.com/CVE-2024-38531/index.md)","id":"CVE-2024-38531","markdown":"https://insights.sbomify.com/CVE-2024-38531/index.md","name":"CVE-2024-38531","record":{"aliases":["DEBIAN-CVE-2024-38531","GHSA-q82p-44mg-mgh5","UBUNTU-CVE-2024-38531"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["privilege_escalation","code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Nix package manager","requires_auth":"low_privilege","summary":"A local attacker can create a setuid binary to hijack Nix daemon permissions and execute arbitrary code during future builds.","user_interaction":"not_required","vuln_class":"privilege_escalation"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":3.6,"severity":"low","source":"cna","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:L","version":"3.1"},"cwes":[{"id":"CWE-278","name":"Insecure Preserved Inherited Permissions"}],"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.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Nix sandbox escape","id":"CVE-2024-38531","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"privilege_escalation","year":"2024"},"n_packages":0,"n_references":2,"next":{"headline":"TEST_KEY used in example dcp_tool reference implementation","id":"CVE-2024-38532"},"packages":[],"prev":{"headline":"Open eClass Platform allows Arbitrary File Upload in \"modules/h5p/save.php\"","id":"CVE-2024-38530"},"products":["nix"],"published":"2024-06-28","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-08-02","vendors":["NixOS"]},"summary":"A local attacker can create a setuid binary to hijack Nix daemon permissions and execute arbitrary code during future builds.","url":"https://insights.sbomify.com/CVE-2024-38531/"}