CWE-379: Creation of Temporary File in Directory with Insecure Permissions

low-risk

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.

Abstraction: Base

Common Consequences

Confidentiality Read Application Data

Detection Methods

Automated Static Analysis

Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

Real-World Examples (10)

CVE CVSS EPSS KEV
CVE-2024-36821 6.8 13.1%
CVE-2021-40708 7.3 5.2%
CVE-2023-26396 7.8 2.2%
CVE-2025-21173 7.3 2.0%
CVE-2024-9950 7.8 1.8%
CVE-2020-11979 7.5 1.1%
CVE-2021-21100 7.8 1.0%
CVE-2024-9500 7.8 1.0%
CVE-2021-39828 5.8 1.0%
CVE-2021-39827 6.5 0.8%
1
/ 100
low-risk
Active Threat 1/50 · Minimal
Exploit Availability 0/50 · Minimal