fix(ClientSPA): bump tmp override to ^0.2.7 (CVE-2026-44705 / GHSA-ph9p-34f9-6g65)#15938
Merged
Merged
Conversation
…9p-34f9-6g65) Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix path traversal vulnerability in tmp package
fix(ClientSPA): bump tmp override to ^0.2.6 (CVE-2026-44705 / GHSA-ph9p-34f9-6g65)
Jun 5, 2026
mikeharder
reviewed
Jun 5, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the APIView ClientSPA npm dependency resolution to address the tmp path traversal vulnerability (CVE-2026-44705 / GHSA-ph9p-34f9-6g65) by forcing a patched tmp version via npm overrides and regenerating the lockfile to reflect the resolved version.
Changes:
- Bumped the
overrides.external-editor.tmpconstraint to a patchedtmpversion range. - Regenerated
package-lock.jsonsotmpresolves to0.2.7.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/dotnet/APIView/ClientSPA/package.json | Updates the npm override for external-editor’s transitive tmp dependency. |
| src/dotnet/APIView/ClientSPA/package-lock.json | Reflects the updated resolution to tmp@0.2.7 after lockfile regeneration. |
Files not reviewed (1)
- src/dotnet/APIView/ClientSPA/package-lock.json: Language not supported
Comment on lines
93
to
95
| "external-editor": { | ||
| "tmp": "^0.2.5" | ||
| "tmp": "^0.2.7" | ||
| } |
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.
tmp@0.2.5has a path traversal vulnerability (CVE-2026-44705) where unsanitizedprefix,postfix, ordiroptions allow file creation outside the intended temp directory.Changes
package.json— advances theoverrides["external-editor"]["tmp"]pin from^0.2.5→^0.2.7package-lock.json— regenerated;tmpnow resolves to0.2.7tmpis a transitive dep ofexternal-editorand is not called anywhere in application code, so there is no active exploit surface — this update clears the scanner alert.Original prompt
This section details the Dependabot vulnerability alert you should resolve
<alert_title>tmp has Path Traversal via unsanitized prefix/postfix that enables directory escape</alert_title>
<alert_description>### 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:...