{"id":"CVE-2026-49982","published":"2026-06-11T15:45:00Z","modified":"2026-06-11T18:24:22Z","title":"tmp: Type-confusion bypass of _assertPath in tmp@0.2.6 allows path traversal via non-string prefix/postfix/template","vendor":"raszi","product":"node-tmp","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.2,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00496,"percentile":0.43446,"provenance":"source"},"cwes":[{"id":"CWE-20","name":"Improper Input Validation"},{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://github.com/raszi/node-tmp/security/advisories/GHSA-7c78-jf6q-g5cm","tags":["x_refsource_CONFIRM"]}],"priority":{"score":14.4,"factors":[{"name":"EPSS percentile","points":8.69},{"name":"CVSS severity","points":5.74}]},"vendorSlug":"raszi","affectedVersions":[{"vendor":"raszi","product":"node-tmp","versions":["0.2.6"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2026-06-11T18:24:14.195781Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"tmp","vulnerableRanges":[">=0.2.6, <0.2.7"],"patched":["0.2.7"],"from":["GHSA-7c78-jf6q-g5cm"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-36265","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2025-54798","published":"2025-08-07","fixed":"0.2.4","kev":false},{"cve":"CVE-2026-44705","published":"2026-06-11","fixed":"0.2.6","kev":false,"link":{"from":"CVE-2026-44705","to":"CVE-2026-49982","relation":"successor","confidence":"medium","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"npm:tmp","fromFixed":"0.2.6","toFixed":"0.2.7","daysApart":0},{"kind":"similar","provenance":"machine","score":0.35,"basis":"same product + CWE + description similarity"}]}},{"cve":"CVE-2026-49982","published":"2026-06-11","fixed":"0.2.7","kev":false}],"package":"npm:tmp"}}