CVE-2021-4435
JavaScript vulnerability analysis and mitigation

Overview

An untrusted search path vulnerability (CVE-2021-4435) was discovered in Yarn package manager. The vulnerability affects versions up to (excluding) 1.22.13. When users run certain Yarn commands in a directory containing attacker-controlled content, malicious commands could be executed in unexpected ways (NVD, Red Hat).

Technical details

The vulnerability is classified as an Untrusted Search Path issue (CWE-426). It received a CVSS v3.1 base score of 7.8 (HIGH) with the vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H. The vulnerability requires local access and user interaction but no privileges, while potentially affecting the confidentiality, integrity, and availability of the system (NVD).

Impact

If exploited, this vulnerability could allow an attacker to execute malicious commands in unexpected ways when a victim runs certain Yarn commands in a compromised directory. This could lead to arbitrary code execution with the privileges of the user running the Yarn command (NVD).

Mitigation and workarounds

The vulnerability has been fixed in Yarn version 1.22.13. Users are advised to upgrade to this version or later to mitigate the risk. The fix prevents the current working directory from being a valid resolution for exec commands (Yarn Commit, Yarn Release).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management