{"answers":{"affected":"2 open source packages ship an affected version, including tmp. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-49982 exists.","fix":"Upgrade tmp to 0.2.7 or later.","what":"CVE-2026-49982 is a high-severity path traversal vulnerability in raszi node-tmp, published on 11 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-49982 and fix it if it is affected.\n\nWhat it is: CVE-2026-49982 is a high-severity path traversal vulnerability in raszi node-tmp, published on 11 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-49982 exists.\n\nAffected packages and fixed versions:\n- tmp (npm): affected from 0.2.6; fixed in 0.2.7\n- tmp (npm): affected from 0.2.6; fixed in 0.2.7\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-49982/ (Markdown: https://insights.sbomify.com/CVE-2026-49982/index.md)","id":"CVE-2026-49982","markdown":"https://insights.sbomify.com/CVE-2026-49982/index.md","name":"CVE-2026-49982","record":{"aliases":["CLSA-2026-1793207046","ECHO-74e5-bcf8-2c2a","GHSA-7c78-jf6q-g5cm","MINI-3cp6-phcw-7mgg","MINI-pqp9-vfxx-795h","MINI-vhg5-44q3-7ww6","MINI-vrcx-jvcc-6w87","MINI-xf7q-xxgc-9p82","ROOT-APP-NPM-CVE-2026-49982","UBUNTU-CVE-2026-49982"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Node.js tmp library","requires_auth":"none","summary":"Type confusion in tmp library allows path traversal via non-string inputs, enabling attackers to create files outside the temporary directory.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"tmp","vendor":"raszi"}],"cvss":{"score":8.2,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L","version":"3.1"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"},{"id":"CWE-20","name":"Improper Input Validation"}],"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.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"tmp: Type-confusion bypass of _assertPath in tmp@0.2.6 allows path traversal via non-string prefix/postfix/template","id":"CVE-2026-49982","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"path_traversal","year":"2026"},"n_packages":2,"n_references":1,"next":{"headline":"Deno: process.loadEnvFile() bypasses env permission checks and mutates process.env with only read access","id":"CVE-2026-49983"},"packages":[{"ecosystem":"npm","fixed":["0.2.7"],"introduced":["0.2.6"],"last_affected":[],"package":"tmp","purl":null,"source":"GHSA-7c78-jf6q-g5cm"},{"ecosystem":"npm","fixed":["0.2.7"],"introduced":["0.2.6"],"last_affected":[],"package":"tmp","purl":"pkg:npm/tmp","source":"GHSA-7c78-jf6q-g5cm"}],"prev":{"headline":"Twig: Sandbox filter, tag and function allow-list bypass when sandbox state changes between renders for a cached `Template`","id":"CVE-2026-49981"},"products":["node-tmp"],"published":"2026-06-11","related":[{"cvss_score":7.7,"headline":"tmp: Path Traversal via unsanitized prefix/postfix enables directory escape","id":"CVE-2026-44705","kev_date_added":null,"published":"2026-06-11"},{"cvss_score":2.5,"headline":"tmp does not restrict arbitrary temporary file / directory write via symbolic link `dir` parameter","id":"CVE-2025-54798","kev_date_added":null,"published":"2025-08-07"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-06-11","vendors":["raszi"]},"summary":"Type confusion in tmp library allows path traversal via non-string inputs, enabling attackers to create files outside the temporary directory.","url":"https://insights.sbomify.com/CVE-2026-49982/"}