CWEweakness
CWE-379 Creation of Temporary File in Directory with Insecure Permissions
Low
Official page ↗
- Abstraction
- Base
- Structure
- Simple
- Status
- Incomplete
- Likelihood of exploit
- Low
- Languages
- Not Language-Specific
- CWE version
- 5.0
Description
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.
Common consequences
• Confidentiality: Read Application Data — On some operating systems, the fact that the temporary file exists may be apparent to any user with sufficient privileges to access that directory. Since the file is visible, the application that is using the temporary file could be known. If one has access to list the processes on the system, the attacker has gained information about what the user is doing at that time. By correlating this with the applications the user is running, an attacker could potentially discover what a user's actions are. From this, higher levels of security could be breached.
Potential mitigations
• [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.
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.)
Observed examples
• CVE-2022-27818: A hotkey daemon written in Rust creates a domain socket file underneath /tmp, which is accessible by any user.
• CVE-2021-41989: analytic platform's repair functionality uses the %TEMP% folder of a user while running with higher privileges
• CVE-2021-21290: A Java-based application for a rapid-development framework uses File.createTempFile() to create a random temporary file with insecure default permissions.
Related
Child of · not in database (1)
Observed example · CVE (3)
- CVE-2021-41989 Qlik QlikView through 12.60.20100.0 creates a Temporary File in a Directory with Insecure Permissions. vulnerability
- CVE-2022-27818 SWHKD 1.1.5 unsafely uses the /tmp/swhkd.sock pathname. vulnerability
- CVE-2021-21290 Netty is an open-source, asynchronous event-driven network application framework for rapid development of maintainable high performance… vulnerability
Referenced by CVE · weakness (67)
- CVE-2026-102740 The AsyncHttpClient library allows Java applications to execute HTTP requests and asynchronously process HTTP responses. vulnerability
- CVE-2026-86836 In Eclipse Ankaios versions 0.1.0 through 1.0.2, the agent creates workload files and Control Interface named pipes (FIFOs) under a… vulnerability
- CVE-2026-69482 Creation of temporary file in directory with insecure permissions in Windows Error Reporting allows an authorized attacker to perform… vulnerability
- CVE-2026-85028 Creation of a temporary file in a directory with insecure permissions in the FPGA management tool installation component in AWS FPGA… vulnerability
- CVE-2026-82346 A potential security vulnerability has been identified in the HP ImageDiags for versions prior to 5.0.0.36. vulnerability
- CVE-2026-12555 Potential security vulnerabilities have been identified in HP Easy Start for macOS, versions prior to 2.16.7.260722. vulnerability
- CVE-2026-63693 Dell Client BIOS contains an Improper Link Resolution Before File Access ('Link Following') vulnerability. vulnerability
- CVE-2026-50544 NortheBridge/luminalshine is a Sunshine-compatible game stream host for Moonlight. vulnerability
- CVE-2026-14551 The servereye client (also known as sensorhub, technically ClientAgentContainerService) versions 20.15 and earlier are vulnerable to Local… vulnerability
- CVE-2026-46388 osquery is a SQL powered operating system instrumentation, monitoring, and analytics framework. vulnerability
- CVE-2026-7539 A potential security vulnerability has been identified in the HP Accessory WMI Provider installer for some HP Docking Stations, which might… vulnerability
- CVE-2026-54328 Pi is a minimal terminal coding harness. vulnerability
- CVE-2026-42191 OpenTelemetry.Exporter.OpenTelemetryProtocol is the OTLP (OpenTelemetry Protocol) exporter implementation. vulnerability
- CVE-2019-25677 WinRAR 5.61 contains a denial of service vulnerability that allows local attackers to crash the application by placing a malformed… vulnerability
- CVE-2026-2817 Use of insecure directory in Spring Data Geode snapshot import extracts archives into predictable, permissive directories under the system… vulnerability
- CVE-2025-10279 In mlflow version 2.20.3, the temporary directory used for creating Python virtual environments is assigned insecure world-writable… vulnerability
- CVE-2025-71176 pytest through 9.0.2 on UNIX relies on directories with the /tmp/pytest-of-{user} name pattern, which allows local users to cause a denial… vulnerability
- CVE-2025-64896 Creative Cloud Desktop versions 6.4.0.361 and earlier are affected by a Creation of Temporary File in Directory with Incorrect Permissions… vulnerability
- CVE-2025-33111 IBM Controller 11.1.0 through 11.1.1 and IBM Cognos Controller 11.0.0 through 11.0.1 FP6 is vulnerable to creation of temporary files… vulnerability
- CVE-2024-7562 A potential elevated privilege issue has been reported with InstallShield built Standalone MSI setups having multiple InstallScript custom… vulnerability
- CVE-2025-32802 Kea configuration and API directives can be used to overwrite arbitrary files, subject to permissions granted to Kea. vulnerability
- CVE-2025-32438 make-initrd-ng is a tool for copying binaries and their dependencies. vulnerability
- CVE-2025-27148 Gradle is a build automation tool, and its native-platform tool provides Java bindings for native APIs. vulnerability
- CVE-2025-21162 Photoshop Elements versions 2025.0 and earlier are affected by a Creation of Temporary File in Directory with Incorrect Permissions… vulnerability
- CVE-2025-21173 .NET Elevation of Privilege Vulnerability vulnerability
- CVE-2024-9950 A vulnerability in Forescout SecureConnector v11.3.07.0109 on Windows allows unauthenticated user to modify compliance scripts due to… vulnerability
- CVE-2024-9500 A maliciously crafted DLL file when placed in temporary files and folders that are leveraged by the Autodesk Installer could lead to… vulnerability
- CVE-2023-6080 Lakeside Software’s SysTrack LsiAgent Installer version 10.7.8 for Windows contains a local privilege escalation vulnerability which allows… vulnerability
- CVE-2023-38533 A vulnerability has been identified in TIA Administrator (All versions < V3 SP2). vulnerability
- CVE-2024-36821 Insecure permissions in Linksys Velop WiFi 5 (WHW01v1) 1.1.13.202617 allows attackers to escalate privileges from Guest to root. vulnerability
Referenced by OWASP · mapped cwe (1)
- A01:2025 Broken Access Control Top 10 2025