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.
References (3)
Core 3
Core References
Exploit, Mitigation, Third Party Advisory x_refsource_misc
https://hackerone.com/reports/703138
Various Sources x_refsource_misc
https://github.com/yarnpkg/yarn/blob/master/CHANGELOG.md#1190
Patch x_refsource_misc
https://github.com/yarnpkg/yarn/commit/0474b8c66a8ea298f5e4dedc67b2de464297ad1c
Scores
CVSS v3
5.9
EPSS
0.0046
EPSS Percentile
64.4%
Attack Vector
NETWORK
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
Details
CWE
CWE-367
CWE-840
Status
published
Products (2)
npm/yarn
0 - 1.19.0npm
yarnpkg/yarn
< 1.19.0
Published
Mar 15, 2020
Tracked Since
Feb 18, 2026