Security mailing lists by PureSourceCode

CVE-2026-49982

HIGH 8.2CVSS 3.1

tmp: Type-confusion bypass of _assertPath allows path traversal via non-string prefix/postfix/template

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.

Published
11 Jun 2026
Last modified
26 Oct 2026
Assigned by
security-advisories@github.com
NVD status
Analyzed
Weakness
CWE-20CWE-22
Also known as
GHSA-7c78-jf6q-g5cm
Sources
NVDJSONOSV GHSA-7c78-jf6q-g5cmJSON

Scores

SourceScored byVersionScoreVector / decision
NVD security-advisories@github.com (Secondary) CVSS 3.1 HIGH 8.2 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L
OSV GitHub CVSS 3.1 HIGH 8.2 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD raszi tmp
cpe:2.3:a:raszi:tmp:0.2.6:*:*:*:*:node.js:*:*
= 0.2.6
OSV npm tmp >= 0.2.6, < 0.2.7 0.2.7

References

History

  • 25 Nov 2026 21:03 UTC · NVD: first stored (published 11 Jun 2026)
  • 25 Nov 2026 20:10 UTC · OSV: first stored (published 15 Jun 2026)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.