CVE-2026-49982tmp: Type-confusion bypass of _assertPath in tmp@0.2.6 allows path traversal via…
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.
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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | node-tmp | Fix pending | UBUNTU-CVE-2026-49982 | |
| Ubuntu 26.04 | node-tmp | Under investigation | UBUNTU-CVE-2026-49982 | |
| Ubuntu 25.10 | node-tmp | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2026-49982 | |
| Ubuntu 24.04 | node-tmp | Under investigation | UBUNTU-CVE-2026-49982 | |
| Ubuntu 22.04 | node-tmp | Under investigation | UBUNTU-CVE-2026-49982 | |
| Ubuntu 20.04 | node-tmp | Fix pending | UBUNTU-CVE-2026-49982 | |
| Ubuntu 18.04 | node-tmp | Fix pending | UBUNTU-CVE-2026-49982 | |
| Ubuntu 16.04 | node-tmp | Fix pending | UBUNTU-CVE-2026-49982 | |
| npm library | tmp | Fixed | 0.2.7 | GHSA-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.
- raszi node-tmp: affected: 0.2.6
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.