What’s Vulnerable › Vulnerabilities
CVE-2021-4435: Yarn: untrusted search path
- Severity: high (CVSS 7.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.3% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2024-02-04 · updated 2026-06-17
- Weakness: CWE-426
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.
Affected products
- yarn: before 1.22.13 — fixed in 1.22.13
How to fix
Upgrade to a fixed version: yarn 1.22.13. Check the vendor advisory for mitigations.
References
- https://access.redhat.com/security/cve/CVE-2021-4435
- https://bugzilla.redhat.com/show_bug.cgi?id=2262284
- https://github.com/yarnpkg/yarn/commit/67fcce88935e45092ffa2674c08053f1ef5268a1
- https://github.com/yarnpkg/yarn/releases/tag/v1.22.13
- https://access.redhat.com/security/cve/CVE-2021-4435
- https://bugzilla.redhat.com/show_bug.cgi?id=2262284
- https://github.com/yarnpkg/yarn/commit/67fcce88935e45092ffa2674c08053f1ef5268a1
- https://github.com/yarnpkg/yarn/releases/tag/v1.22.13
Get alerted when CVE-2021-4435 or the next vulnerability affects your stack