CAPEC-155
Screen Temporary Files for Sensitive Information
An adversary exploits the temporary, insecure storage of information by monitoring the content of files used to store temp data during an application's routine execution flow. Many applications use temporary files to accelerate processing or to provide records of state across multiple executions of the application. Sometimes, however, these temporary files may end up storing sensitive information. By screening an application's temporary files, an adversary might be able to discover such sensitive information. For example, web browsers often cache content to accelerate subsequent lookups. If the content contains sensitive information then the adversary could recover this from the web cache.
On this page
Ask an AI about this attack pattern
Show the prompt
Explain the attack pattern CAPEC-155: Screen Temporary Files for Sensitive Information: how it unfolds, what it needs and how to prevent and detect it in my systems. Use https://capec.mitre.org/data/definitions/155.html and https://cve.bz/cve/capec/155?via=ask-ai-copy, which lists recent CVEs with the weaknesses it exploits. Cite the sources.Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this attack pattern's id and public links.
How the attack unfolds
Explore
The attacker looks for a way in.
[Look for temporary files in target application] An adversary will try to discover temporary files in a target application. Knowledge of where the temporary files are being stored is important information.
Experiment
They probe what they found.
[Attempt to read temporary files] An adversary will attempt to read any temporary files they may have discovered through normal means.
3 techniques
- Attempt to get the file by querying the file path to a web server
- Using a remote shell into an application, read temporary files and send out information remotely if necessary
- Recover temporary information from a user's browser cache
Exploit
They carry out the attack.
[Use function weaknesses to gain access to temporary files] If normal means to read temporary files did not work, an adversary will attempt to exploit weak temporary file functions to gain access to temporary files.
2 techniques
- Some C functions such as tmpnam(), tempnam(), and mktemp() will create a temporary file with a unique name, but do not stop an adversary from creating a file of the same name before it is opened by the application. Because these functions do not create file names that are sufficiently random, an adversary will try to make a file of the same name, causing a collision, and possibly altering file permissions for the temporary file so that it is able to be read.
- Similar to the last technique, an adversary might also create a file name collision using a linked file in a unix system such that the temporary file contents written out by the application write to a file of the adversaries choosing, allowing them to read the file contents.
Prerequisites
The target application must utilize temporary files and must fail to adequately secure them against other parties reading them.
Resources required
Because some application may have a large number of temporary files and/or these temporary files may be very large, an adversary may need tools that help them quickly search these files for sensitive information. If the adversary can simply copy the files to another location and if the speed of the search is not important, the adversary can still perform the attack without any special resources.
Weaknesses it exploits
- CWE-377 Insecure Temporary File
Recent CVEs with these weaknesses
- 5.1CVE-2026-140038
A flaw was found in the gprofng component of binutils. The utility creates temporary directories in shared locations using predictable names based on user and process identifiers without verifying whether the directory already exists. A lo…
- 7.3CVE-2026-80459
Dell Secure Connect Gateway - Virtual Edition, versions prior to 5.36.00.16, contains an Insecure Temporary File vulnerability. A low privileged local attacker could potentially exploit this vulnerability, leading to Filesystem access for …
- 5.8CVE-2026-137570
Open Policy Agent before 1.20.0 contains an insecure temporary file vulnerability that allows local users to overwrite files by abusing the fixed OCI store path used when persistence_directory is unset. Attackers can pre-create the opa/oci…
- 7.3CVE-2026-80269
Dell Secure Connect Gateway (SCG) Virtual Edition, versions prior to 5.36.00.16, contains an Insecure Temporary File vulnerability. A low privileged attacker with local access could potentially exploit this vulnerability, leading to filesy…
- 5.4CVE-2026-55172
Open OnDemand is an open-source high-performance computing portal. Prior to 4.1.6 and 4.2.3, apps/dashboard/config/initializers/session_store.rb stores dashboard sessions by default in a predictable /var/tmp/<username> directory, or in ano…
- 5.0CVE-2026-121717
fzf is a command-line fuzzy finder. Prior to 0.74.5, trigger-driven zsh completion in shell/completion.zsh uses _fzf_feed_fifo to create a FIFO at the predictable shared path ${TMPDIR:-/tmp}/fzf-complete-fifo-$$ and continues after removal…
- 8.5CVE-2026-62336
qbee-agent is the device agent component of the qbee.io IoT device management platform. Prior to 2026.27, the privileged createFile helper followed attacker-controlled symbolic links during file creation. A local unprivileged user whose ac…
- 7.3CVE-2026-126823
A local user with an ordinary account on the same host can place a file in a shared temporary location that the JDBC driver's native library loading routine will accept and load without verifying its origin. Loading the driver class in a J…
The newest records naming one of them. Each weakness's page lists them all.
Related attack patterns
- Part of
- CAPEC-150 Collect Data from Common Resource Locations
MITRE's words, unchanged: CAPEC-155 at MITRE. CAPEC is Copyright © 2007–2026, The MITRE Corporation, used under the CAPEC terms of use: “The MITRE Corporation (MITRE) hereby grants you a non-exclusive, royalty-free license to use Common Attack Pattern Enumeration and Classification (CAPEC™) for research, development, and commercial purposes. Any copy you make for such purposes is authorized provided that you reproduce MITRE’s copyright designation and this license in any such copy.” CAPEC and the CAPEC logo are trademarks of The MITRE Corporation. Credits. All attack patterns.