{"answers":{"affected":"2 open source packages ship an affected version, including @npmcli/arborist. It affects 3 products.","exploited":"There is no known exploitation of CVE-2021-39134 in the wild and no public exploit code.","fix":"Upgrade @npmcli/arborist to 2.8.2 or later.","what":"CVE-2021-39134 is a high-severity path traversal vulnerability in Oracle Graalvm, published on 31 Aug 2021. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2021-39134 and fix it if it is affected.\n\nWhat it is: CVE-2021-39134 is a high-severity path traversal vulnerability in Oracle Graalvm, published on 31 Aug 2021. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2021-39134 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @npmcli/arborist (npm): affected all versions; fixed in 2.8.2\n- @npmcli/arborist (npm): affected all versions; fixed in 2.8.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-2021-39134/ (Markdown: https://insights.sbomify.com/CVE-2021-39134/index.md)","id":"CVE-2021-39134","markdown":"https://insights.sbomify.com/CVE-2021-39134/index.md","name":"CVE-2021-39134","record":{"aliases":["ALPINE-CVE-2021-39134","CLEANSTART-2026-IC69554","CLEANSTART-2026-OW30917","DEBIAN-CVE-2021-39134","GHSA-2h3h-q99f-3fhc","UBUNTU-CVE-2021-39134"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_modify","code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"npm dependency manager","requires_auth":"none","summary":"Attackers can write arbitrary files to any filesystem location via symlink confusion on case-insensitive systems, affecting npm users.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"arborist","vendor":"npmjs"},{"product":"graalvm","vendor":"oracle"},{"product":"sinec_infrastructure_network_services","vendor":"siemens"}],"cvss":{"score":8.2,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-178","name":"Improper Handling of Case Sensitivity"},{"id":"CWE-61","name":"UNIX Symbolic Link (Symlink) Following"}],"description":"`@npmcli/arborist`, the library that calculates dependency trees and manages the `node_modules` folder hierarchy for the npm command line interface, aims to guarantee that package dependency contracts will be met, and the extraction of package contents will always be performed into the expected folder. This is, in part, accomplished by resolving dependency specifiers defined in `package.json` manifests for dependencies with a specific name, and nesting folders to resolve conflicting dependencies. When multiple dependencies differ only in the case of their name, Arborist's internal data structure saw them as separate items that could coexist within the same level in the `node_modules` hierarchy. However, on case-insensitive file systems (such as macOS and Windows), this is not the case. Combined with a symlink dependency such as `file:/some/path`, this allowed an attacker to create a situation in which arbitrary contents could be written to any location on the filesystem. For example, a package `pwn-a` could define a dependency in their `package.json` file such as `\"foo\": \"file:/some/path\"`. Another package, `pwn-b` could define a dependency such as `FOO: \"file:foo.tgz\"`. On case-insensitive file systems, if `pwn-a` was installed, and then `pwn-b` was installed afterwards, the contents of `foo.tgz` would be written to `/some/path`, and any existing contents of `/some/path` would be removed. Anyone using npm v7.20.6 or earlier on a case-insensitive filesystem is potentially affected. This is patched in @npmcli/arborist 2.8.2 which is included in npm v7.20.7 and above.","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":"UNIX Symbolic Link (Symlink) Following in @npmcli/arborist","id":"CVE-2021-39134","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":"oracle:graalvm","products":["oracle:graalvm","siemens:sinec_infrastructure_network_services"],"type":"path_traversal","year":"2021"},"n_packages":2,"n_references":4,"next":{"headline":"UNIX Symbolic Link (Symlink) Following in @npmcli/arborist","id":"CVE-2021-39135"},"packages":[{"ecosystem":"npm","fixed":["2.8.2"],"introduced":["0"],"last_affected":[],"package":"@npmcli/arborist","purl":null,"source":"GHSA-2h3h-q99f-3fhc"},{"ecosystem":"npm","fixed":["2.8.2"],"introduced":["0"],"last_affected":[],"package":"@npmcli/arborist","purl":"pkg:npm/%40npmcli/arborist","source":"GHSA-2h3h-q99f-3fhc"}],"prev":{"headline":"Cross-Site Request Forgery (CSRF) can run untrusted code on Rundeck server","id":"CVE-2021-39133"},"products":["arborist"],"published":"2021-08-31","related":[{"cvss_score":8.2,"headline":"UNIX Symbolic Link (Symlink) Following in @npmcli/arborist","id":"CVE-2021-39135","kev_date_added":null,"published":"2021-08-31"}],"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-04","vendors":["npm"]},"summary":"Attackers can write arbitrary files to any filesystem location via symlink confusion on case-insensitive systems, affecting npm users.","url":"https://insights.sbomify.com/CVE-2021-39134/"}