{"answers":{"affected":"2 open source packages ship an affected version, including tar. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-31802 exists.","fix":"Upgrade tar to 7.5.11 or later.","what":"CVE-2026-31802 is a high-severity path traversal vulnerability in isaacs node-tar, published on 9 Mar 2026. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-31802 and fix it if it is affected.\n\nWhat it is: CVE-2026-31802 is a high-severity path traversal vulnerability in isaacs node-tar, published on 9 Mar 2026. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-31802 exists.\n\nAffected packages and fixed versions:\n- tar (npm): affected all versions; fixed in 7.5.11\n- tar (npm): affected all versions; fixed in 7.5.11\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-31802/ (Markdown: https://insights.sbomify.com/CVE-2026-31802/index.md)","id":"CVE-2026-31802","markdown":"https://insights.sbomify.com/CVE-2026-31802/index.md","name":"CVE-2026-31802","record":{"aliases":["AZL-101781","CLEANSTART-2026-DZ05381","CLEANSTART-2026-NW62895","CLSA-2026-1776731786","DEBIAN-CVE-2026-31802","ECHO-4999-d2de-3586","GHSA-9ppj-qmqm-q256","MINI-2774-67jv-4hwq","MINI-2c3c-rr49-cw8v","MINI-2r4m-xgqf-3vc9","MINI-389j-h7h8-88cx","MINI-3fg9-x6c9-gc5q","MINI-4ccx-cvj8-j3gw","MINI-4gfx-r86g-r7xh","MINI-62r3-7v8r-xx88","MINI-6qw2-f55h-gmxx","MINI-7m27-gmwv-m29q","MINI-9756-fjw7-g3g6","MINI-9rvr-9jvj-8rvr","MINI-fcj3-c4cj-84mg","MINI-fcp7-g2jg-j4xw","MINI-h4v2-gvq5-f89q","MINI-j948-p24m-7rgh","MINI-jmh9-wpwp-r3c7","MINI-mrrg-c7v9-wfc2","MINI-q28v-g45g-x8mf","MINI-q2hq-2xg3-gm49","MINI-rcc9-j5r4-w3p3","MINI-w694-6vrf-q9vc","MINI-w6hf-2pp7-7r8p","MINI-w7r6-f568-wg9w","MINI-wj4j-vv6m-9xmh","MINI-wjx8-r2mf-547m","MINI-wx75-vgrh-46r4","ROOT-APP-NPM-CVE-2026-31802","UBUNTU-CVE-2026-31802"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_modify"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Node.js tar library","requires_auth":"none","summary":"Attackers can overwrite files outside the extraction directory by crafting tar archives with drive-relative symlink targets in node-tar.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"tar","vendor":"isaacs"}],"cvss":{"score":8.2,"severity":"high","source":"cna","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:H/SA:N","version":"4.0"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"node-tar is a full-featured Tar for Node.js. Prior to version 7.5.11, tar (npm) can be tricked into creating a symlink that points outside the extraction directory by using a drive-relative symlink target such as C:../../../target.txt, which enables file overwrite outside cwd during normal tar.x() extraction. This vulnerability is fixed in 7.5.11.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":"2026-03-14","github_poc":3,"max_poc_stars":1,"metasploit":0,"nuclei":0,"refs":[{"date":"2026-03-14T22:04:11Z","kind":"github_poc","ref":"https://github.com/Jvr2022/CVE-2026-31802","stars":1,"title":"PoC and write-up for CVE-2026-31802, a symlink path traversal vulnerability in npm tar enabling arbitrary file overwrite outside the extraction directory."},{"date":"2026-03-28T20:49:46Z","kind":"github_poc","ref":"https://github.com/Recorded-texteditor120/CVE-2026-31802","stars":1,"title":"Demonstrate and analyze the CVE-2026-31802 path traversal vulnerability in npm tar, enabling arbitrary file overwrite via symlink extraction."},{"date":"2026-05-22T23:46:38Z","kind":"github_poc","ref":"https://github.com/ridhinva/npm-tar-path-traversal-scanner","stars":0,"title":"Scanner: CVE-2026-31802 npm tar path traversal — Python checker for arbitrary file write via npm pack"}],"tier":"weaponised"},"has_fix":true,"headline":"node-tar Symlink Path Traversal via Drive-Relative Linkpath","id":"CVE-2026-31802","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"path_traversal","year":"2026"},"n_packages":2,"n_references":2,"next":{"headline":"Combodo iTop: Reflected XSS in tag admin","id":"CVE-2026-31803"},"packages":[{"ecosystem":"npm","fixed":["7.5.11"],"introduced":["0"],"last_affected":[],"package":"tar","purl":null,"source":"GHSA-9ppj-qmqm-q256"},{"ecosystem":"npm","fixed":["7.5.11"],"introduced":["0"],"last_affected":[],"package":"tar","purl":"pkg:npm/tar","source":"GHSA-9ppj-qmqm-q256"}],"prev":{"headline":"zot create-only policy allows overwrite attempts of existing latest tag (update permission not required)","id":"CVE-2026-31801"},"products":["node-tar"],"published":"2026-03-09","related":[{"cvss_score":9.2,"headline":"node-tar: Decompression/parse DoS via unlimited input","id":"CVE-2026-59873","kev_date_added":null,"published":"2026-07-08"},{"cvss_score":8.8,"headline":"node-tar has Race Condition in Path Reservations via Unicode Ligature Collisions on macOS APFS","id":"CVE-2026-23950","kev_date_added":null,"published":"2026-01-20"},{"cvss_score":8.7,"headline":"node-tar: Negative tar entry size causes infinite loop in archive replace","id":"CVE-2026-59874","kev_date_added":null,"published":"2026-07-08"},{"cvss_score":8.2,"headline":"node-tar: Hardlink Path Traversal via Drive-Relative Linkpath","id":"CVE-2026-29786","kev_date_added":null,"published":"2026-03-07"},{"cvss_score":8.2,"headline":"node-tar Vulnerable to Arbitrary File Creation/Overwrite via Hardlink Path Traversal","id":"CVE-2026-24842","kev_date_added":null,"published":"2026-01-28"},{"cvss_score":8.2,"headline":"node-tar Vulnerable to Arbitrary File Overwrite and Symlink Poisoning via Insufficient Path Sanitization","id":"CVE-2026-23745","kev_date_added":null,"published":"2026-01-16"}],"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)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-03-10","vendors":["isaacs"]},"summary":"Attackers can overwrite files outside the extraction directory by crafting tar archives with drive-relative symlink targets in node-tar.","url":"https://insights.sbomify.com/CVE-2026-31802/"}