{"answers":{"affected":"4 open source packages ship an affected version, including tar. It affects 1 product.","exploited":"There is no known exploitation of CVE-2018-20834 in the wild and no public exploit code.","fix":"Upgrade tar to a fixed version for your release line: 2.2.2 or 4.4.2.","what":"CVE-2018-20834 is a high-severity path traversal vulnerability in n/a, published on 30 Apr 2019. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2018-20834 and fix it if it is affected.\n\nWhat it is: CVE-2018-20834 is a high-severity path traversal vulnerability in n/a, published on 30 Apr 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2018-20834 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- tar (npm): affected all versions; fixed in 2.2.2\n- tar (npm): affected all versions; fixed in 2.2.2\n- tar (npm): affected from 3.0.0; fixed in 4.4.2\n- tar (npm): affected from 3.0.0; fixed in 4.4.2\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-2018-20834/ (Markdown: https://insights.sbomify.com/CVE-2018-20834/index.md)","id":"CVE-2018-20834","markdown":"https://insights.sbomify.com/CVE-2018-20834/index.md","name":"CVE-2018-20834","record":{"aliases":["DEBIAN-CVE-2018-20834","GHSA-j44m-qm6p-hp7m"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Node.js tar library","requires_auth":"none","summary":"An attacker can overwrite arbitrary files on the system by crafting a malicious tarball with specific hardlink structures, affecting applications using the node-tar library.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"tar","vendor":"isaacs"}],"cvss":{"score":7.5,"severity":"high","source":"nvd","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","version":"3.0"},"cwes":[{"id":"CWE-59","name":"Improper Link Resolution Before File Access"}],"description":"A vulnerability was found in node-tar before version 4.4.2 (excluding version 2.2.2). An Arbitrary File Overwrite issue exists when extracting a tarball containing a hardlink to a file that already exists on the system, in conjunction with a later plain file with the same name as the hardlink. This plain file content replaces the existing file content. A patch has been applied to node-tar v2.2.2).","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Arbitrary File Overwrite in tar","id":"CVE-2018-20834","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"path_traversal","year":"2018"},"n_packages":4,"n_references":7,"next":{"headline":"Improper Input Validation in tar-fs","id":"CVE-2018-20835"},"packages":[{"ecosystem":"npm","fixed":["2.2.2"],"introduced":["0"],"last_affected":[],"package":"tar","purl":null,"source":"GHSA-j44m-qm6p-hp7m"},{"ecosystem":"npm","fixed":["2.2.2"],"introduced":["0"],"last_affected":[],"package":"tar","purl":"pkg:npm/tar","source":"GHSA-j44m-qm6p-hp7m"},{"ecosystem":"npm","fixed":["4.4.2"],"introduced":["3.0.0"],"last_affected":[],"package":"tar","purl":null,"source":"GHSA-j44m-qm6p-hp7m"},{"ecosystem":"npm","fixed":["4.4.2"],"introduced":["3.0.0"],"last_affected":[],"package":"tar","purl":"pkg:npm/tar","source":"GHSA-j44m-qm6p-hp7m"}],"prev":{"headline":"Cross-site scripting in Jira","id":"CVE-2018-20827"},"products":["n/a"],"published":"2019-04-30","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 Symlink Path Traversal via Drive-Relative Linkpath","id":"CVE-2026-31802","kev_date_added":null,"published":"2026-03-09"},{"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)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-05","vendors":["n/a"]},"summary":"An attacker can overwrite arbitrary files on the system by crafting a malicious tarball with specific hardlink structures, affecting applications using the node-tar library.","url":"https://insights.sbomify.com/CVE-2018-20834/"}