Update dependency tmp to v0.2.6 [SECURITY]#28202
Open
tryghost-renovate[bot] wants to merge 1 commit into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #28202 +/- ##
=======================================
Coverage 73.88% 73.88%
=======================================
Files 1531 1531
Lines 129865 129865
Branches 15582 15585 +3
=======================================
+ Hits 95954 95956 +2
+ Misses 32949 32922 -27
- Partials 962 987 +25
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
2d61eab to
f95bab5
Compare
Contributor
Author
|
f95bab5 to
b5b184c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.2.5→0.2.6tmp has Path Traversal via unsanitized prefix/postfix that enables directory escape
CVE-2026-44705 / GHSA-ph9p-34f9-6g65
More information
Details
Summary
The tmp npm package contains a path traversal vulnerability that allows escaping the intended temporary directory when untrusted data flows into the
prefix,postfix, ordiroptions. 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.Details
Root Cause:
The vulnerability exists in tmp's path construction logic where user-supplied options are directly concatenated into file paths without sanitization or validation.
Technical Flow:
<prefix>-<pid>-<random>-<postfix>path.join(tmpDir, opts.dir, name)path.join()normalizes traversal sequences, allowing escapeVulnerable Pattern:
Path Traversal Mechanics:
../../../evilin prefix escapes directory structureopts.diris absolute,path.join()ignorestmpDircompletelypath.join()resolves../sequences regardless of surrounding text..\\), Unix (../), and mixed path systemsKey Vulnerability Points:
prefix,postfix, ordirparameterspath.join()normalization without containment checksPoC
Basic Path Traversal via prefix:
Directory Escape via postfix:
Absolute Path Bypass via dir:
Advanced Multi-Vector Attack:
Real-World Attack Simulation:
Impact
Arbitrary File Creation:
Attack Scenarios:
1. Web Application Configuration Poisoning:
2. Cache Poisoning:
3. Build Pipeline Compromise:
4. Container Escape Attempt:
5. Multi-Tenant Service Bypass:
Business Impact:
Affected Products
Component Impact:
tmp.file()function - vulnerable to prefix/postfix/dir traversaltmp.dir()function - vulnerable to same parameter manipulationtmp.tmpName()function - if using affected path constructionSeverity: High
CVSS v3.1: 8.1 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L)
CWE Classification:
Remediation
Input Validation and Sanitization:
Secure Implementation Pattern:
Workarounds
For Application Developers:
For Security Teams:
Detection and Monitoring
Static Analysis:
Runtime Detection:
File System Monitoring:
Acknowledgements
Reported by: Mapta / BugBunny_ai
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:PReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
raszi/node-tmp (tmp)
v0.2.6Compare Source
Configuration
📅 Schedule: (in timezone Etc/UTC)
* * * * 0,6)* 23 * * 1-5)* 0-4 * * 1-6)🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate.