{"cve":"CVE-2026-49982","nvd":{"published":"2026-06-11T17:16:35.227","modified":"2026-10-26T11:10:00.157","status":"Analyzed","description":"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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L","score":8.2},"cwes":["CWE-20","CWE-22"],"references":["https://github.com/raszi/node-tmp/security/advisories/GHSA-7c78-jf6q-g5cm","https://github.com/raszi/node-tmp/security/advisories/GHSA-7c78-jf6q-g5cm"],"products":["raszi:tmp"],"source":"nvd","synced_at":"2026-10-26T11:33:08.859761529+00:00"},"epss":{"cve":"CVE-2026-49982","score":0.00496,"percentile":0.42239,"date":"2026-10-25"},"kev":null,"osv":[{"id":"GHSA-7c78-jf6q-g5cm","url":"https://osv.dev/vulnerability/GHSA-7c78-jf6q-g5cm","summary":"tmp: Type-confusion bypass of _assertPath allows path traversal via non-string prefix/postfix/template","modified":"2026-09-10T03:50:48.728956651Z","packages":[{"ecosystem":"npm","name":"tmp","purl":"pkg:npm/tmp","ranges":[">=0.2.6 <0.2.7"],"fixed":["0.2.7"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}