Skip to main content

node-tmp CVE-2026-49982

| EUVDEUVD-2026-36265 HIGH
Improper Input Validation (CWE-20)
2026-06-11 GitHub_M GHSA-7c78-jf6q-g5cm
8.2
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify Node.js endpoint forwarding input to tmp
  2. Delivery
    Send JSON or qs bracket-array prefix payload
  3. Exploit
    Bypass _assertPath via non-string includes check
  4. Execution
    String coercion yields ../ path in _generateTmpName
  5. Persist
    path.join resolves outside tmpdir
  6. Impact
    Write attacker-controlled file or directory with process privileges

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation, allowlisting
Exploitation Conditions

Exploitation requires (1) an application using tmp at exactly the 0.2.6 release, (2) that application passing untrusted input from a request into the prefix, postfix, or template option of tmp.file, tmp.fileSync, tmp.dir, tmp.dirSync, tmp.tmpName, or tmp.tmpNameSync without forcing a string type (e.g. raw req.body.prefix or req.query.prefix from qs with bracket-array parsing enabled), and (3) the supplied value to be a non-string (Array, Buffer, or object) whose .includes('..') returns falsy but whose stringification yields a ../-bearing path. The host process must also have filesystem permissions to write at the targeted out-of-tmp location. Limiting factors: applications that explicitly String()-coerce or schema-validate these options as strings are not exploitable, purely server-internal uses of tmp (no user-controlled options) are not reachable, and apps that disable qs array parsing close the query-string vector.

Impact

CVSS 8.2 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L) reflects a network-reachable, no-auth, no-interaction bug with high integrity impact (arbitrary file/dir creation) and low availability impact, and that vector aligns with the description's typical exposure path (untrusted JSON or qs bracket-array input flowing into tmp.* APIs). The reach is genuine - tmp is a very common transitive dependency - but real-world exploitability hinges on an application actually forwarding untrusted request data into prefix/postfix/template without type coercion, which is a non-default code pattern rather than an out-of-the-box default. There is no CISA KEV listing and no public POC identified, and EPSS is not provided in the input, so this is best treated as a high-priority library patch for any service that processes user-controlled options into tmp, not a drop-everything zero-day. Note the apparent tension between PR:N/AV:N and the fact that the vulnerable sink is library-internal: the network-vector rating is valid only for apps that expose the option surface to remote input - purely internal uses of tmp carry materially lower real risk.

Exploit ScenarioDerived

An attacker sends a request such as POST /upload with a JSON body {"prefix": ["..", "..", "etc", "cron.d", "evil"]} (or the query string ?prefix[]=..&prefix[]=..&prefix[]=etc&prefix[]=cron.d&prefix[]=evil against an app using qs bracket parsing) to a Node.js service that forwards request fields into tmp.file({ prefix: req.body.prefix }). The 0.2.6 _assertPath guard sees an array, .includes('..') returns false, and path.join later resolves the joined string to a location outside the temp directory, creating an attacker-named file or directory with the service's privileges. No public POC is referenced in the advisory, but the bypass pattern is trivial to construct from the description.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 11, 2026

Path traversal in node-tmp 0.2.6 allows remote attackers to create files or directories outside the temp directory by supplying non-string prefix, postfix, or template values (arrays, Buffers, or objects) whose includes('..') check returns falsy but whose string coercion contains ../. The 0.2.6 _assertPath guard checks only strings, so JSON body fields or qs-parsed bracket arrays such as ?prefix[]=.. bypass it and write at attacker-controlled paths with host-process privileges. No public exploit identified at time of analysis, but the bypass pattern is trivial and the library is widely used in Node.js applications.

RemediationAI

Vendor-released patch: upgrade tmp to 0.2.7 or later (npm install tmp@^0.2.7) and refresh package-lock.json / yarn.lock; also audit transitive dependencies with npm ls tmp and force-resolve via overrides (npm) or resolutions (Yarn/pnpm) where older versions are pinned by indirect deps - see GHSA-7c78-jf6q-g5cm at https://github.com/raszi/node-tmp/security/advisories/GHSA-7c78-jf6q-g5cm. If immediate upgrade is impossible, explicitly coerce prefix, postfix, and template to strings (String(value)) before passing them into any tmp.* API, and reject values whose stringification contains .. or path separators; the trade-off is that this requires touching every call site and missing one re-opens the bug. As a defense-in-depth layer, disable qs's bracket-array parsing (e.g. express's query parser: 'simple' or qs { parseArrays: false }) and validate request bodies with a schema library (Zod, Joi, ajv) that enforces string types on any field that reaches tmp - the side effect is that legitimate clients relying on array query parameters will need to change their request format.

Affected VersionsENISA

node-tmp 0.2.6

Affected Packages

npm tmp fix: 0.2.7
euvd node_tmp no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in npm, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The tmp package (raszi/node-tmp) is a widely depended-on Node.js library for creating temporary files and directories, used directly and transitively by many build tools and servers. The fix in 0.2.6 introduced a string-only _assertPath guard that calls .includes('..') on the user-supplied prefix/postfix/template options. Because JavaScript's Array.prototype.includes and Buffer.prototype.includes perform element/byte comparisons rather than substring matching, an array like ['..','etc','passwd'] or a Buffer containing ../ returns false from includes('..') and passes the guard. The value then reaches _generateTmpName, where Array.prototype.join or implicit String() coercion turns it back into a ../-bearing string, and path.join(tmpDir, opts.dir, name) resolves the traversal - classic CWE-20 improper input validation enabling out-of-temp-dir file/directory creation. Affected CPE is cpe:2.3:a:raszi:node-tmp:*:*:*:*:*:*:*:* at version 0.2.6.

Know when Node.js gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 8.2 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L
vuln.today AI 8.2 HIGH

Reachable over the network with no auth or interaction when an app forwards request data into tmp options; arbitrary file/dir creation gives high integrity and low availability impact, no direct confidentiality loss.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N
SUSE 6.1 MEDIUM
AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
Low

DescriptionCVE.org

tmp is a temporary file and directory creator for node.js. In version 0.2.6, the _assertPath guard added to tmp rejects only string values that contain the substring ... It is bypassed when prefix, postfix, or template is supplied as a non-string value (Array, Buffer, or any object) whose includes('..') returns falsy but whose stringification still contains ../. The value flows through Array.prototype.join/String coercion inside _generateTmpName and path.join(tmpDir, opts.dir, name), producing a final path that escapes tmpdir and creates a file or directory at an attacker-controlled location with the host process's privileges. This affects any application that forwards untrusted request data (a common pattern is JSON body fields or qs-parsed bracket-array query strings such as ?prefix[]=...) into tmp.file, tmp.fileSync, tmp.dir, tmp.dirSync, tmp.tmpName, or tmp.tmpNameSync without explicit type coercion. This vulnerability is fixed in 0.2.7.

Executive ViewAI

Why It Matters

node-tmp version 0.2.6 contains a path traversal vulnerability (CVE-2026-49982) that enables attackers to write arbitrary files outside the intended temp directory with host process privileges. Applications using this library lack vendor-provided patches and face immediate risk of data breach, malicious code execution, and system compromise. Immediate action is required to inventory, assess, and mitigate exposure across all affected systems.

Business Impact: Severe
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Implement strict input validation permitting only alphanumeric characters in prefix/postfix/template parameters; (2) Deploy mandatory OS-level access controls (AppArmor/SELinux profiles) restricting file system write operations to designated temp directories; (3) Execute affected applications with least-privilege user accounts; (4) Monitor temp directory activity for path traversal patterns; (5) Evaluate and test alternative libraries (temp-dir, tmp-promise); (6) Implement canonical path verification before file operations.

Threat Intelligence Overview

EPSS Score
0.1%
Top 83% exploitable
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor CIRCL GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Partial

Priority Score

61
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +41
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

CVE-2025-68613 HIGH POC
8.8 Dec 19

Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation

CVE-2024-41713 CRITICAL POC
9.1 Oct 21

A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could

CVE-2024-55591 CRITICAL POC
9.8 Jan 14

FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote

CVE-2023-44487 HIGH POC
7.5 Oct 10

Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour

CVE-2014-7205 CRITICAL POC
10.0 Oct 08

Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t

CVE-2025-59528 CRITICAL POC
10.0 Sep 22

Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete

CVE-2017-14849 HIGH POC
7.5 Sep 28

Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc

CVE-2017-5941 CRITICAL POC
9.8 Feb 09

An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2014-3744 HIGH POC
7.5 Oct 23

Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi

CVE-2014-9566 HIGH POC
7.5 Mar 10

Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin

CVE-2024-35286 CRITICAL POC
9.8 Oct 21

A vulnerability in NuPoint Messenger (NPM) of Mitel MiCollab through 9.8.0.33 allows an unauthenticated attacker to cond

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise High Performance Computing 12 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Not-Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy