CyberSecBulletin

Creation of Temporary File in Directory with Insecure Permissions

CWE-379

The product creates a temporary file in a directory whose permissions allow unintended actors to determine the file's existence or otherwise access that file.

We track 27 vulnerabilities of this type. 100% are rated high or critical, and the average CVSS score is 7.9.

How this weakness is prevented

  • Requirements: Many contemporary languages have functions which properly handle this condition. Older C temp file functions are especially susceptible.
  • Implementation: Try to store sensitive tempfiles in a directory which is not world readable -- i.e., per-user directories.
  • Implementation: Avoid using vulnerable temp file functions.

Latest Creation of Temporary File in Directory with Insecure Permissions vulnerabilities