Skip to content
OpenAdvisories
Medium · 5.9 CVE-2019-15608 EUVD-2022-1051GHSA-hjxc-462x-x77j

TOCTOU Race Condition in Yarn

Published Mar 15, 2020 · Updated Aug 5, 2024 · Assigned by hackerone

Description

The package integrity validation in yarn < 1.19.0 contains a TOCTOU vulnerability where the hash is computed before writing a package to cache. It's not computed again when reading from the cache. This may lead to a cache pollution attack.

Affected products

VendorProductAffectedFixed
— yarn Fixed in 1.19.0 —

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.

ReleasePackageFixed inAdvisory
Debian 14 node-yarnpkg 1.19.1-1 —
Debian 13 node-yarnpkg 1.19.1-1 —
Debian 12 node-yarnpkg 1.19.1-1 —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling yarn 1.19.0-r0 —

Affected packages

EcosystemPackageAffectedFixedRecord
npm yarn < 1.19.0 1.19.0 GHSA-hjxc-462x-x77j

References