Vulnerability
CVE-2026-49982
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.
87 advisories report this vulnerability, across 4 ecosystems.
Advisories in Wolfi
- CGA-296h-wx22-826r
- CGA-34rg-6c5w-5769
- CGA-48fw-4rjc-m5p4
- CGA-6pxc-xr2h-hpjh
- CGA-7jfg-5cm9-q4fv
- CGA-8x29-374f-cpj3
- CGA-9726-vwcp-rwpq
- CGA-9wpc-5863-j695
- CGA-ch38-3rxm-8hq6
- CGA-gqhj-h386-9fcm
- CGA-hw33-mrhw-98c7
- CGA-m48x-v6xh-9xhg
- CGA-m7xm-m386-h6pr
- CGA-p5xw-cf65-r3mx
- CGA-pq7c-jc5x-hx68
- CGA-r57p-rrc3-2cr6
- CGA-rcf5-gpg8-fp5p
- CGA-vx82-qffm-4w2x
- CGA-wxx3-788f-6cwp