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
- CGA-296h-wx22-826r
- CGA-2hgw-77q8-m3h5
- CGA-2j2m-6r86-7698
- CGA-2vgv-2cc8-52m6
- CGA-2w88-j88g-mgcx
- CGA-34rg-6c5w-5769
- CGA-367m-f24m-rxvq
- CGA-45q7-36r5-67q7
- CGA-48fw-4rjc-m5p4
- CGA-49rq-mhqc-hxj2
- CGA-4v8g-w39f-g65f
- CGA-5cf5-7x5h-p3c8
- CGA-5gwh-gq38-r2wc
- CGA-5jff-x745-fjcx
- CGA-5rjv-p29j-wpv2
- CGA-6pxc-xr2h-hpjh
- CGA-6v37-h266-68cv
- CGA-6xg9-27v6-jhv8
- CGA-72pg-w2xm-pmj3
- CGA-7g9x-mx72-jpw5
- CGA-7jfg-5cm9-q4fv
- CGA-7qpr-gphj-x7mw
- CGA-7ww7-4p2f-f474
- CGA-8x29-374f-cpj3
- CGA-9726-vwcp-rwpq
- CGA-98rg-5mr7-hpq9
- CGA-9fvp-vwh6-pfxm
- CGA-9qr7-9wrv-99gh
- CGA-9wpc-5863-j695
- CGA-c3r6-55hr-q4fq
- CGA-c635-4wq3-2gpf
- CGA-cgv9-j4c6-jf2v
- CGA-ch38-3rxm-8hq6
- CGA-cv26-c9wp-cfqm
- CGA-cxmm-3wrj-p64g
- CGA-cxvr-5jr8-w6h7
- CGA-f6jc-j8r2-p9p5
- CGA-fr56-2r5p-fq2x
- CGA-fv34-8p7f-2hxm
- CGA-gjqr-gvv5-359q
- CGA-gm67-h77p-gfwc
- CGA-gp53-x65x-jxf6
- CGA-gqhj-h386-9fcm
- CGA-h546-hj5w-g57f
- CGA-hh5h-fjg9-fgp7
- CGA-hq24-2wfj-54hv
- CGA-hw33-mrhw-98c7
- CGA-j28g-52c6-m42w
- CGA-j5g8-qfm5-v33m
- CGA-jghh-5vm3-fwpx
- CGA-jm9p-2r8q-q344
- CGA-jpxj-6746-6vmw
- CGA-m48x-v6xh-9xhg
- CGA-m7xm-m386-h6pr
- CGA-mcg2-4pfc-5mm7
- CGA-mfj7-3pg3-v376
- CGA-mgq5-6v96-m59r
- CGA-mm5f-gxqj-7v55
- CGA-mrq4-2rqv-f73q
- CGA-p5xw-cf65-r3mx
- CGA-p879-6xwp-qrv7
- CGA-p98p-64hr-5424
- CGA-pq7c-jc5x-hx68
- CGA-q2vq-wv48-wqxc
- CGA-qxhp-43r2-pwv9
- CGA-r2v4-rp6c-ppf6
- CGA-r57p-rrc3-2cr6
- CGA-r5h7-wj55-cwm5
- CGA-rcf5-gpg8-fp5p
- CGA-rcpr-j593-qw4r
- CGA-rfc9-4fxx-r3g2
- CGA-rpfq-9jrq-vgjq
- CGA-vhv9-39qw-76wp
- CGA-vr93-wv3v-84px
- CGA-vrgh-72cw-mwx8
- CGA-vx82-qffm-4w2x
- CGA-vxg2-782c-r7hg
- CGA-w656-5qfv-ww56
- CGA-wgvc-gvqr-fr2j
- CGA-wjrq-2pcj-cfvq
- CGA-wq9h-9jp6-qpfq
- CGA-wxx3-788f-6cwp
- CGA-x563-g4wq-2pxj
- CGA-xfcq-f3w8-qxwj
- CGA-xvp5-rjmx-9rxm
-
GHSA-7c78-jf6q-g5cm
tmp: Type-confusion bypass of _assertPath allows path traversal via non-string prefix/postfix/template
-
UBUNTU-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…