{"answers":{"affected":"2 open source packages ship an affected version, including yarn. It affects 1 product.","exploited":"There is no known exploitation of CVE-2020-8131 in the wild and no public exploit code.","fix":"Upgrade yarn to 1.22.0 or later.","what":"CVE-2020-8131 is a high-severity path traversal vulnerability in yarn, published on 24 Feb 2020. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2020-8131 and fix it if it is affected.\n\nWhat it is: CVE-2020-8131 is a high-severity path traversal vulnerability in yarn, published on 24 Feb 2020. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2020-8131 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- yarn (npm): affected all versions; fixed in 1.22.0\n- yarn (npm): affected all versions; fixed in 1.22.0\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-2020-8131/ (Markdown: https://insights.sbomify.com/CVE-2020-8131/index.md)","id":"CVE-2020-8131","markdown":"https://insights.sbomify.com/CVE-2020-8131/index.md","name":"CVE-2020-8131","record":{"aliases":["DEBIAN-CVE-2020-8131","GHSA-8mfc-v7wv-p62g","ROOT-APP-NPM-CVE-2020-8131"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["code_execution","data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Yarn package manager","requires_auth":"none","summary":"Attackers can write to arbitrary filesystem paths via malicious packages, potentially leading to code execution in Yarn.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"hackerone","cpe":[{"product":"yarn","vendor":"yarnpkg"}],"cvss":{"score":7.5,"severity":"high","source":"nvd","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"Arbitrary filesystem write vulnerability in Yarn before 1.22.0 allows attackers to write to any path on the filesystem and potentially lead to arbitrary code execution by forcing the user to install a malicious package.","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":"Path Traversal in Yarn","id":"CVE-2020-8131","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"path_traversal","year":"2020"},"n_packages":2,"n_references":2,"next":{"headline":"Improper Input Validation and Code Injection in pdf-image","id":"CVE-2020-8132"},"packages":[{"ecosystem":"npm","fixed":["1.22.0"],"introduced":["0"],"last_affected":[],"package":"yarn","purl":null,"source":"GHSA-8mfc-v7wv-p62g"},{"ecosystem":"npm","fixed":["1.22.0"],"introduced":["0"],"last_affected":[],"package":"yarn","purl":"pkg:npm/yarn","source":"GHSA-8mfc-v7wv-p62g"}],"prev":{"headline":"OS Command Injection in Rake","id":"CVE-2020-8130"},"products":["yarn"],"published":"2020-02-24","related":[{"cvss_score":8.1,"headline":"Missing Encryption of Sensitive Data in yarn","id":"CVE-2019-5448","kev_date_added":null,"published":"2019-07-30"},{"cvss_score":7.8,"headline":"Yarn Improper link resolution before file access (Link Following)","id":"CVE-2019-10773","kev_date_added":null,"published":"2019-12-16"},{"cvss_score":7.7,"headline":"Yarn: untrusted search path","id":"CVE-2021-4435","kev_date_added":null,"published":"2024-02-04"},{"cvss_score":5.9,"headline":"TOCTOU Race Condition in Yarn","id":"CVE-2019-15608","kev_date_added":null,"published":"2020-03-15"},{"cvss_score":5.3,"headline":"yarnpkg Yarn hosted-git-resolver.js explodeHostedGitFragment redos","id":"CVE-2025-8262","kev_date_added":null,"published":"2025-07-28"},{"cvss_score":4.8,"headline":"yarnpkg Yarn request-manager.js setOptions redos","id":"CVE-2025-9308","kev_date_added":null,"published":"2025-08-21"}],"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":["n/a"]},"summary":"Attackers can write to arbitrary filesystem paths via malicious packages, potentially leading to code execution in Yarn.","url":"https://insights.sbomify.com/CVE-2020-8131/"}