CVEfocus › CVE database › CVE-2026-49982

CVE-2026-49982tmp: Type-confusion bypass of _assertPath in tmp@0.2.6 allows path traversal via…

CVSS 8.2 HighEPSS 0.6% (higher than 43% of CVEs)Published 2026-06-11Updated 2026-06-11Assigner: GitHub_M

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.

CWE-20CWE-22

What to do

Fixed builds are available from npm: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

1Fixed
4Fix pending
3Under investigation
1Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10node-tmpFix pendingUBUNTU-CVE-2026-49982
Ubuntu 26.04node-tmpUnder investigationUBUNTU-CVE-2026-49982
Ubuntu 25.10node-tmpWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2026-49982
Ubuntu 24.04node-tmpUnder investigationUBUNTU-CVE-2026-49982
Ubuntu 22.04node-tmpUnder investigationUBUNTU-CVE-2026-49982
Ubuntu 20.04node-tmpFix pendingUBUNTU-CVE-2026-49982
Ubuntu 18.04node-tmpFix pendingUBUNTU-CVE-2026-49982
Ubuntu 16.04node-tmpFix pendingUBUNTU-CVE-2026-49982
npm librarytmpFixed0.2.7GHSA-7c78-jf6q-g5cm

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.