---
title: "GHSA-5xf4-f2fq-f69j: Yarn Improper link resolution before file access (Link Following)"
description: "High severity. Yarn Improper link resolution before file access (Link Following). Affects yarn; fixed in 1.22.0."
url: https://inlinr.com/advisories/GHSA-5xf4-f2fq-f69j
lang: en
---

[Packages](https://inlinr.com/packages) / [yarn](https://inlinr.com/packages/yarn) / [Security](https://inlinr.com/packages/yarn/security)

High Vulnerability GHSA-5xf4-f2fq-f69j CVE-2019-10773 Published 14 Feb 2020

# Yarn Improper link resolution before file access (Link Following)

Your version 

Affected releases · [yarn](https://inlinr.com/packages/yarn)

- 1.x 1.0.0 – 1.21.1 Fixed in 1.22.0
- 0.28.x and older 0.1.0 – 0.28.4 No fix, no longer updated

On 1.x, the newest line:

```
npm install yarn@1.22.0
```

Every release on a timeline

2.x 

1. Not affected

2.4.3  
1 release

1.x 

1. Affected

1.0.0 – 1.21.1  
40 releases
2. Fixed

1.22.0 – 1.22.22  
21 releases, latest

0.x 

1. Affected

0.1.0 – 0.28.4  
56 releases

118 stable releases of yarn, oldest to newest, one row per major.

## What happens

In Yarn before 1.21.1, the package install functionality can be abused to generate arbitrary symlinks on the host filesystem by using specially crafted "bin" keys. Existing files could be overwritten depending on the current user permission set.

## How it is exploited

Exploitable with local access, with no account and a user to do something.

- **Confidentiality**: high
- **Integrity**: high
- **Availability**: high

CVSS:3.1/​AV:L/​AC:L/​PR:N/​UI:R/​S:U/​C:H/​I:H/​A:H

## References

- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2019-10773 "https://nvd.nist.gov/vuln/detail/CVE-2019-10773")  
nvd.nist.gov/vuln/detail/CVE-2019-10773
- [Issue](https://github.com/yarnpkg/yarn/issues/7761#issuecomment-565493023 "https://github.com/yarnpkg/yarn/issues/7761#issuecomment-565493023")  
#7761
- [Pull request](https://github.com/yarnpkg/yarn/pull/7755 "https://github.com/yarnpkg/yarn/pull/7755")  
#7755
- [Fix commit](https://github.com/yarnpkg/yarn/commit/039bafd74b7b1a88a53a54f8fa6fa872615e90e7 "https://github.com/yarnpkg/yarn/commit/039bafd74b7b1a88a53a54f8fa6fa872615e90e7")  
039bafd
- [Reference](https://access.redhat.com/errata/RHSA-2020:0475 "https://access.redhat.com/errata/RHSA-2020:0475")  
access.redhat.com/errata/RHSA-2020:0475
- [Reference](https://blog.daniel-ruf.de/critical-design-flaw-npm-pnpm-yarn "https://blog.daniel-ruf.de/critical-design-flaw-npm-pnpm-yarn")  
blog.daniel-ruf.de/critical-design-flaw-npm-pnp…
- [Reference](https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3HIZW4NZVV5QY5WWGW2JRP3FHYKZ6ZJ5 "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3HIZW4NZVV5QY5WWGW2JRP3FHYKZ6ZJ5")  
lists.fedoraproject.org/archives/list/package-a…
- [Reference](https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ITY5BC63CCC647DFNUQRQ5AJDKUKUNBI "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ITY5BC63CCC647DFNUQRQ5AJDKUKUNBI")  
lists.fedoraproject.org/archives/list/package-a…
- [Reference](https://snyk.io/vuln/SNYK-JS-YARN-537806, "https://snyk.io/vuln/SNYK-JS-YARN-537806,")  
snyk.io/vuln/SNYK-JS-YARN-537806,

A whole project to check? Paste its package.json in the [dependency check](https://inlinr.com/tools/dependency-check): every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.
