CVE-2021-4435: Yarn untrusted search path vulnerability
7.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.10707%
CWE
Published
2/4/2024
Updated
2/5/2024
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| yarn | npm | < 1.22.13 | 1.22.13 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from Yarn's child process functions (forkp/spawnp/spawn) resolving executables from the current working directory without validation. The patch adds a 'validate' function to these entry points to block execution of local files matching PATHEXT extensions. The functions were vulnerable because they executed programs without ensuring the path wasn't controlled by an attacker via the cwd, matching CWE-426's untrusted search path pattern. High confidence comes from the direct correlation between the patched functions and the vulnerability description in CVE/GHSA.