CWE-378: Creation of Temporary File With Insecure Permissions

low-risk

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

Abstraction: Base

Common Consequences

Confidentiality Read Application Data
Authorization Other
Integrity Other

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-39872 9.6 0.5%
CVE-2022-24823 5.5 0.4%
CVE-2025-32979 6.5 0.2%
CVE-2016-9485 7.8 0.2%
CVE-2021-25654 6.2 0.2%
CVE-2021-28168 6.2 0.2%
CVE-2021-1496 7.0 0.1%
CVE-2021-21331 3.0 0.1%
CVE-2024-23454 6.2 0.1%
CVE-2020-27216 7.0 0.1%
0
/ 100
low-risk
Active Threat 0/50 · Minimal
Exploit Availability 0/50 · Minimal