Skip to content

tmp-0.2.6.tgz: 1 vulnerabilities (highest severity is: 8.2) #1168

Description

@mend-for-github-com
Vulnerable Library - tmp-0.2.6.tgz

Temporary file and directory creator

Library home page: https://registry.npmjs.org/tmp/-/tmp-0.2.6.tgz

Path to dependency file: /package.json

Path to vulnerable library: /package.json

Found in HEAD commit: c9b81c0d0b0a1bc182ee03daf510955de7fa715b

Vulnerabilities

Vulnerability Severity CVSS Dependency Type Fixed in (tmp version) Remediation Possible**
CVE-2026-49982 High 8.2 tmp-0.2.6.tgz Direct tmp - 0.2.7

**In some cases, Remediation PR cannot be created automatically for a vulnerability despite the availability of remediation

Details

CVE-2026-49982

Vulnerable Library - tmp-0.2.6.tgz

Temporary file and directory creator

Library home page: https://registry.npmjs.org/tmp/-/tmp-0.2.6.tgz

Path to dependency file: /package.json

Path to vulnerable library: /package.json

Dependency Hierarchy:

  • tmp-0.2.6.tgz (Vulnerable Library)

Found in HEAD commit: c9b81c0d0b0a1bc182ee03daf510955de7fa715b

Found in base branch: main

Vulnerability Details

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.

Publish Date: 2026-06-11

URL: CVE-2026-49982

CVSS 3 Score Details (8.2)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: High
    • Availability Impact: Low

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: GHSA-7c78-jf6q-g5cm

Release Date: 2026-06-11

Fix Resolution: tmp - 0.2.7

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions