CVE-2019-10773 Yarn Improper link resolution before file access (Link Following)

High 7.8 Published Updated

Attackers can create arbitrary symlinks via crafted bin keys, potentially overwriting files and executing code on the host system.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2019-10773?

CVE-2019-10773 is a high-severity path traversal vulnerability in Yarn, published on 16 Dec 2019. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

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.

Weakness: CWE-59

Which versions are affected by CVE-2019-10773?

2 open source packages ship an affected version, including yarn. It affects 1 product.

PackageAffectedFixed in
yarn npmAll versions1.22.0
yarn npmAll versions1.22.0

Products include Yarnpkg Yarn.

How do I fix CVE-2019-10773?

Upgrade yarn to 1.22.0 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2019-10773 being exploited?

There is no known exploitation of CVE-2019-10773 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2019-10773, GHSA-5xf4-f2fq-f69j, ROOT-APP-NPM-CVE-2019-10773, SNYK-JS-YARN-537806,, UBUNTU-CVE-2019-10773.

Is CVE-2019-10773 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free