CVE-2026-44705
Received Received - Intake
Path Traversal in tmp Node.js Package

Publication date: 2026-06-11

Last updated on: 2026-06-11

Assigner: GitHub, Inc.

Description
tmp is a temporary file and directory creator for node.js. Prior to 0.2.6, the tmp npm package contains a path traversal vulnerability that allows escaping the intended temporary directory when untrusted data flows into the prefix, postfix, or dir options. By embedding traversal sequences (e.g., ../) or path separators in these parameters, attackers can cause files to be created outside the configured temporary base directory at attacker-controlled locations with the privileges of the running process. This vulnerability affects applications that pass user-controlled data to tmp's file/directory creation functions without proper input sanitization. This vulnerability is fixed in 0.2.6.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-06-11
Last Modified
2026-06-11
Generated
2026-06-11
AI Q&A
2026-06-11
EPSS Evaluated
N/A
NVD
EUVD
Affected Vendors & Products
Currently, no data is known.
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-22 The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Executive Summary

The CVE-2026-44705 vulnerability affects the npm package "tmp," which is used for creating temporary files and directories in Node.js applications.

It is a path traversal vulnerability that allows attackers to escape the intended temporary directory by injecting unsanitized path sequences (e.g., "../") into the prefix, postfix, or dir options.

This happens because the package directly concatenates user-supplied input into file paths without proper validation or sanitization, and the Node.js path.join() function normalizes these traversal sequences, enabling directory escape.

As a result, attackers can cause files to be created outside the configured temporary base directory at attacker-controlled locations with the privileges of the running process.

Impact Analysis

This vulnerability can lead to arbitrary file creation outside the intended temporary directory, potentially overwriting existing files or placing malicious content in sensitive locations.

Real-world attack scenarios include web application configuration poisoning, cache poisoning, build pipeline compromise, container escape attempts, and multi-tenant service bypasses.

The impact can result in data integrity issues, service disruption, security bypasses, and compliance violations.

Compliance Impact

This vulnerability can lead to compliance violations due to unauthorized file creation and potential security bypasses, which may compromise data integrity and confidentiality.

Such security issues can affect adherence to standards and regulations like GDPR and HIPAA that require protection of sensitive data and secure handling of information.

Detection Guidance

Detection of this vulnerability involves monitoring for suspicious file creation outside the intended temporary directories, especially files created via the tmp package with user-controlled input in prefix, postfix, or dir parameters.

Security teams can implement runtime monitoring and file system monitoring to detect unexpected file creations or modifications in locations outside the normal temporary directory paths.

Code reviews focusing on the usage of the tmp package can help identify unsafe usage patterns where user input is passed without sanitization.

While no specific commands are provided in the resources, general commands to detect suspicious files could include:

  • Using find to locate recently created files outside expected temp directories, e.g., `find / -type f -ctime -1` to find files created in the last day.
  • Using auditd or inotifywait to monitor file creation events in directories outside the expected temporary directory.
  • Checking application logs for unusual file creation or errors related to tmp usage.
Mitigation Strategies

Immediate mitigation steps include sanitizing and validating all user input passed to the tmp package's prefix, postfix, and dir options to prevent path traversal sequences such as '../'.

Developers should avoid passing user-controlled data directly to these parameters or implement strict input validation to ensure no path traversal or path separator characters are included.

Post-construction validation of the final file path should be performed to ensure that the created file remains within the intended temporary directory.

Security teams should conduct code reviews to identify vulnerable usage of the tmp package and apply fixes accordingly.

Implement runtime monitoring and file system monitoring to detect and respond to any suspicious file creations outside the expected directories.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-44705. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart