{"answers":{"affected":"2 open source packages ship an affected version, including yarn. It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-4435 in the wild and no public exploit code.","fix":"Upgrade yarn to 1.22.13 or later.","what":"CVE-2021-4435 is a high-severity path traversal vulnerability in Fedora Extra Packages for Enterprise Linux, published on 4 Feb 2024. 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-4435 and fix it if it is affected.\n\nWhat it is: CVE-2021-4435 is a high-severity path traversal vulnerability in Fedora Extra Packages for Enterprise Linux, published on 4 Feb 2024. 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-4435 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- yarn (npm): affected all versions; fixed in 1.22.13\n- yarn (npm): affected all versions; fixed in 1.22.13\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-4435/ (Markdown: https://insights.sbomify.com/CVE-2021-4435/index.md)","id":"CVE-2021-4435","markdown":"https://insights.sbomify.com/CVE-2021-4435/index.md","name":"CVE-2021-4435","record":{"aliases":["CLSA-2026-1786471978","DEBIAN-CVE-2021-4435","GHSA-mpwj-fcr6-x34c","ROOT-APP-NPM-CVE-2021-4435","UBUNTU-CVE-2021-4435"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Yarn package manager","requires_auth":"none","summary":"Attackers can execute malicious commands when victims run Yarn in directories with attacker-controlled content due to untrusted search paths.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"fedora","cpe":[{"product":"yarn","vendor":"yarnpkg"}],"cvss":{"score":7.7,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-426","name":"Untrusted Search Path"}],"description":"An untrusted search path vulnerability was found in Yarn. When a victim runs certain Yarn commands in a directory with attacker-controlled content, malicious commands could be executed in unexpected ways.","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":"Yarn: untrusted search path","id":"CVE-2021-4435","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"path_traversal","year":"2021"},"n_packages":2,"n_references":4,"next":{"headline":"3DPrint Lite \u003c 1.9.1.5 - Unauthenticated Arbitrary File Upload","id":"CVE-2021-4436"},"packages":[{"ecosystem":"npm","fixed":["1.22.13"],"introduced":["0"],"last_affected":[],"package":"yarn","purl":null,"source":"GHSA-mpwj-fcr6-x34c"},{"ecosystem":"npm","fixed":["1.22.13"],"introduced":["0"],"last_affected":[],"package":"yarn","purl":"pkg:npm/yarn","source":"GHSA-mpwj-fcr6-x34c"}],"prev":{"headline":"Social Warfare \u003c= 3.5.2 - Remote Code Execution","id":"CVE-2021-4434"},"products":["Extra Packages for Enterprise Linux","Fedora","yarn"],"published":"2024-02-04","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.5,"headline":"Path Traversal in Yarn","id":"CVE-2020-8131","kev_date_added":null,"published":"2020-02-24"},{"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":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-06-17","vendors":["Fedora","n/a"]},"summary":"Attackers can execute malicious commands when victims run Yarn in directories with attacker-controlled content due to untrusted search paths.","url":"https://insights.sbomify.com/CVE-2021-4435/"}