Arbitrary File Overwrite in yarn package for dependency management



Published: 2020-02-21 | Updated: 2020-03-07
Risk Medium
Patch available YES
Number of vulnerabilities 1
CVE-ID CVE-2020-8131
CWE-ID CWE-22
Exploitation vector Network
Public exploit N/A
Vulnerable software
Subscribe
yarn
Web applications / Modules and components for CMS

Vendor Yarn

Security Bulletin

This security bulletin contains information about 1 vulnerabilities.

Updated 03.03.2020
Assigned CVE-ID number.

1) Path traversal

EUVDB-ID: #VU25504

Risk: Medium

CVSSv3.1: 6 [CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N/E:U/RL:U/RC:C]

CVE-ID: CVE-2020-8131

CWE-ID: CWE-22 - Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Exploit availability: No

Description

The vulnerability allows a remote attacker to perform directory traversal attacks.

The vulnerability exists due to symlinks not being correctly unpacked as part of the Yarn install process. It is possible for a malicious package, upon install, to write to any path on the filesystem even when the "--ignore-scripts" option is set. A remote attacker can overwrite arbitrary files on the target system.

Mitigation

Install updates from vendor's website.

Vulnerable software versions

yarn: 0.2.0 - 1.21.1

External links

http://snyk.io/vuln/SNYK-JS-YARN-548869
http://github.com/yarnpkg/yarn/commit/0e7133ca28618513503b4e1d9063f1c18ea318e5
http://hackerone.com/reports/730239


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

No. We are not aware of malware exploiting this vulnerability.



###SIDEBAR###