CyberSecBulletin
CVE-2025-32438NVD status: Deferred

nixpkgs: Creation of Temporary File With Insecure Permissions

CVE-2025-32438 is a high-severity creation of temporary file with insecure permissions vulnerability in nixpkgs from NixOS, with a CVSS 3.1 base score of 8.8 out of 10. It can be exploited with local access to the system by an attacker with a low-privileged account, without any action from a user. Affected nixpkgs versions: < b17590193d8e5697000c23c66afcf11e1753734d; < fbf76bf72b161b9f4ab97704a8258776d5f3ffba. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 0.19% chance of exploitation within 30 days, which is low compared with other CVEs.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Check which version of nixpkgs you run against the affected versions below, and install the vendor's latest release.
  2. Read the advisory on github.com for workarounds and exact fixed builds.

Affected products and versions

VendorProductAffected versionsFixed in
NixOSnixpkgs< b17590193d8e5697000c23c66afcf11e1753734d; < fbf76bf72b161b9f4ab97704a8258776d5f3ffbaNot stated

Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.

How the severity score breaks down

Attack vector
LocalThe attacker needs local access or must trick a user into running something.
Attack complexity
LowNo special conditions are needed; the attack works reliably.
Privileges required
LowA basic user account is enough.
User interaction
NoneNo action by a victim is required.
Scope
ChangedThe attack can reach beyond the vulnerable component into other systems.
Confidentiality
HighAll data handled by the component can be read.
Integrity
HighData or code can be modified at will.
Availability
HighThe component can be taken down completely.

Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H. Scored by CNA (github.com).

Official description

make-initrd-ng is a tool for copying binaries and their dependencies. Local privilege escalation affecting all NixOS users. With systemd.shutdownRamfs.enable enabled (the default) a local user is able to create a program that will be executed by root during shutdown. Patches exist for NixOS 24.11 and 25.05 / unstable. As a workaround, set systemd.shutdownRamfs.enable = false;.

Source: the CVE record as published by its numbering authority, via NVD and CVE.org.

The underlying weakness: Creation of Temporary File With Insecure Permissions

Opening temporary files without appropriate measures or controls can leave the file, its contents and any function that it impacts vulnerable to attack.

How developers prevent this class of flaw

  • Many contemporary languages have functions which properly handle this condition. Older C temp file functions are especially susceptible.
  • Ensure that you use proper file permissions. This can be achieved by using a safe temp file function. Temporary files should be writable and readable only by the process that owns the file.
  • Randomize temporary file names. This can also be achieved by using a safe temp-file function. This will ensure that temporary files will not be created in predictable places.

More Creation of Temporary File With Insecure Permissions vulnerabilities (CWE-378)

Timeline

  1. CVE record published.
  2. CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
  3. Record last changed materially (score, affected products, status or references).

References

Other vulnerabilities in nixpkgs

All nixpkgs vulnerabilities

Recent Creation of Temporary File With Insecure Permissions vulnerabilities

Spotted an error? Tell us.