Bug 1851875 (CVE-2019-15608) - CVE-2019-15608 yarn: TOCTOU vulnerability leads to cache pollution
Summary: CVE-2019-15608 yarn: TOCTOU vulnerability leads to cache pollution
Keywords:
Status: CLOSED NOTABUG
Alias: CVE-2019-15608
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1851876
Blocks: 1851877
TreeView+ depends on / blocked
 
Reported: 2020-06-29 10:00 UTC by msiddiqu
Modified: 2021-06-07 15:01 UTC (History)
5 users (show)

Fixed In Version: yarn-1.19.0
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in Yarn. The package integrity validation in Yarn contains a time-of-check to time-of-use (TOCTOU) vulnerability where the hash is computed before writing a package to cache and is not computed again when reading from the cache. This flaw may lead to a cache pollution attack. The highest threat from this vulnerability is to integrity.
Clone Of:
Environment:
Last Closed: 2020-06-30 05:20:25 UTC


Attachments (Terms of Use)

Description msiddiqu 2020-06-29 10:00:50 UTC
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:

https://github.com/yarnpkg/yarn/blob/master/CHANGELOG.md#1190
https://github.com/yarnpkg/yarn/commit/0474b8c66a8ea298f5e4dedc67b2de464297ad1c
https://hackerone.com/reports/703138

Comment 1 msiddiqu 2020-06-29 10:01:24 UTC
Created nodejs-yarn tracking bugs for this issue:

Affects: fedora-all [bug 1851876]

Comment 2 Jason Shepherd 2020-06-29 23:54:34 UTC
Mitigation:

Run 'yarn cache clean' before installs.

Comment 3 Jason Shepherd 2020-06-29 23:56:35 UTC
Red Hat Quay 3.2 is built with yarn 1.19.1 which has a fix for this issue.

Comment 4 Product Security DevOps Team 2020-06-30 05:20:25 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2019-15608


Note You need to log in before you can comment on or make changes to this bug.