---
title: "GHSA-8mfc-v7wv-p62g: Path Traversal in Yarn"
description: "High severity. Path Traversal in Yarn. Affects yarn; fixed in 1.22.0."
url: https://inlinr.com/advisories/GHSA-8mfc-v7wv-p62g
lang: en
---

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

High Vulnerability GHSA-8mfc-v7wv-p62g CVE-2020-8131 Published 9 Feb 2022

# Path Traversal in Yarn

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

Arbitrary filesystem write vulnerability in Yarn 1.21.1 and earlier allows attackers to write to any path on the filesystem and potentially lead to arbitrary code execution by forcing the user to install a malicious package.

## How it is exploited

Exploitable over the network, with no account and a user to do something.

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

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

## References

- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2020-8131 "https://nvd.nist.gov/vuln/detail/CVE-2020-8131")  
nvd.nist.gov/vuln/detail/CVE-2020-8131
- [Pull request](https://github.com/yarnpkg/yarn/pull/7831 "https://github.com/yarnpkg/yarn/pull/7831")  
#7831
- [Reference](https://hackerone.com/reports/730239 "https://hackerone.com/reports/730239")  
hackerone.com/reports/730239

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.
