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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| — | Yarn | All versions prior to version 1.21.1 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | node-yarnpkg | 1.21.1-1 | — |
| Debian 13 | node-yarnpkg | 1.21.1-1 | — |
| Debian 12 | node-yarnpkg | 1.21.1-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 22.04 LTS | node-yarnpkg | No fix yet | — |
| Ubuntu 20.04 LTS | node-yarnpkg | No fix yet | — |
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | yarn | 1.21.1-r0 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| npm | yarn | < 1.22.0 | 1.22.0 | GHSA-5xf4-f2fq-f69j |
References
- https://snyk.io/vuln/SNYK-JS-YARN-537806%2C
- https://github.com/yarnpkg/yarn/commit/039bafd74b7b1a88a53a54f8fa6fa872615e90e7
- https://github.com/yarnpkg/yarn/issues/7761#issuecomment-565493023
- https://blog.daniel-ruf.de/critical-design-flaw-npm-pnpm-yarn/
- FEDORA-2020-766ce5adae vendor-advisory
- FEDORA-2020-7525beefa1 vendor-advisory
- RHSA-2020:0475 vendor-advisory