- Issue created by @hossein.daliran
- Status changed to Needs work
3 months ago 1:20pm 12 August 2024 - π¬π§United Kingdom longwave UK
yarn audit
also reports problems withws
, let's fix that at the same time. - π¬π§United Kingdom longwave UK
Note also that this only affects development dependencies and can't be exploited at runtime, the Drupal Security Team will not be issuing a security release or advisory about this change.
- π³π±Netherlands spokje
Spokje β changed the visibility of the branch 3467599-update-braces-npm to hidden.
- Assigned to spokje
- π³π±Netherlands spokje
Oh, the joy of supporting multiple versions of core...
This looks like this is going to be a different MR for at least 11.x/10.x and perhaps even one for every minor version.Lets start with
11.x
.Firstly in yarn v4-land apparently
yarn audit
now becameyarn npm audit -R
.On
11.x
that gives us:$ yarn npm audit -R ββ @humanwhocodes/config-array β ββ ID: @humanwhocodes/config-array (deprecation) β ββ Issue: Use @eslint/config-array instead β ββ Severity: moderate β ββ Vulnerable Versions: 0.11.14 β β β ββ Tree Versions β β ββ 0.11.14 β β β ββ Dependents β ββ eslint@npm:8.57.0 β ββ @humanwhocodes/object-schema β ββ ID: @humanwhocodes/object-schema (deprecation) β ββ Issue: Use @eslint/object-schema instead β ββ Severity: moderate β ββ Vulnerable Versions: 2.0.3 β β β ββ Tree Versions β β ββ 2.0.3 β β β ββ Dependents β ββ @humanwhocodes/config-array@npm:0.11.14 β ββ braces β ββ ID: 1098094 β ββ Issue: Uncontrolled resource consumption in braces β ββ URL: https://github.com/advisories/GHSA-grv7-fg5c-xmjg β ββ Severity: high β ββ Vulnerable Versions: <3.0.3 β β β ββ Tree Versions β β ββ 3.0.2 β β β ββ Dependents β ββ chokidar@npm:3.6.0 β ββ glob β ββ ID: glob (deprecation) β ββ Issue: Glob versions prior to v9 are no longer supported β ββ Severity: moderate β ββ Vulnerable Versions: 8.1.0 β β β ββ Tree Versions β β ββ 8.1.0 β β β ββ Dependents β ββ mocha@npm:10.3.0 β ββ inflight β ββ ID: inflight (deprecation) β ββ Issue: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. β ββ Severity: moderate β ββ Vulnerable Versions: 1.0.6 β β β ββ Tree Versions β β ββ 1.0.6 β β β ββ Dependents β ββ glob@npm:7.2.3 β ββ rimraf β ββ ID: rimraf (deprecation) β ββ Issue: Rimraf versions prior to v4 are no longer supported β ββ Severity: moderate β ββ Vulnerable Versions: 3.0.2 β β β ββ Tree Versions β β ββ 3.0.2 β β β ββ Dependents β ββ flat-cache@npm:3.2.0 β ββ tar ββ ID: 1097493 ββ Issue: Denial of service while parsing a tar file due to lack of folders count validation ββ URL: https://github.com/advisories/GHSA-f5x3-32g6-xq36 ββ Severity: moderate ββ Vulnerable Versions: <6.2.1 β ββ Tree Versions β ββ 6.2.0 β ββ Dependents ββ node-gyp@npm:10.0.1
If we snip the deprecations that leaves us with:
$ yarn npm audit -R ββ braces β ββ ID: 1098094 β ββ Issue: Uncontrolled resource consumption in braces β ββ URL: https://github.com/advisories/GHSA-grv7-fg5c-xmjg β ββ Severity: high β ββ Vulnerable Versions: <3.0.3 β β β ββ Tree Versions β β ββ 3.0.2 β β β ββ Dependents β ββ chokidar@npm:3.6.0 β β ββ rimraf β ββ ID: rimraf (deprecation) β ββ Issue: Rimraf versions prior to v4 are no longer supported β ββ Severity: moderate β ββ Vulnerable Versions: 3.0.2 β β β ββ Tree Versions β β ββ 3.0.2 β β β ββ Dependents β ββ flat-cache@npm:3.2.0 β ββ tar ββ ID: 1097493 ββ Issue: Denial of service while parsing a tar file due to lack of folders count validation ββ URL: https://github.com/advisories/GHSA-f5x3-32g6-xq36 ββ Severity: moderate ββ Vulnerable Versions: <6.2.1 β ββ Tree Versions β ββ 6.2.0 β ββ Dependents ββ node-gyp@npm:10.0.1
- Issue was unassigned.
- Status changed to Needs review
3 months ago 6:05am 13 August 2024 - π³π±Netherlands spokje
So the
11.x
-branch didn't break tests.Let the backport-games begin!
- Status changed to Needs work
3 months ago 1:52pm 18 August 2024 - πΊπΈUnited States smustgrave
if I understand the thread a piece of the change should be reverted.
- Status changed to Needs review
3 months ago 2:26pm 18 August 2024 - π³π±Netherlands spokje
Thanks @smustgrave, wasn't pinged on the comment on the MR.
Replied inline, back to NR to await the answer of @longwave.
- π³π±Netherlands spokje
Opened a new branch using the
yarn up -R <name>
method, not usingresolutions
. - Status changed to RTBC
3 months ago 12:59pm 22 August 2024 - πΊπΈUnited States smustgrave
Reviewed the MR with just the lock file and seems straight forward. Didn't cause any issues locally updating.
- Status changed to Downport
3 months ago 2:38pm 22 August 2024 - π³π±Netherlands spokje
11.0.x:
$ yarn npm audit -R ββ @humanwhocodes/config-array β ββ ID: @humanwhocodes/config-array (deprecation) β ββ Issue: Use @eslint/config-array instead β ββ Severity: moderate β ββ Vulnerable Versions: 0.11.14 β β β ββ Tree Versions β β ββ 0.11.14 β β β ββ Dependents β ββ eslint@npm:8.57.0 β ββ @humanwhocodes/object-schema β ββ ID: @humanwhocodes/object-schema (deprecation) β ββ Issue: Use @eslint/object-schema instead β ββ Severity: moderate β ββ Vulnerable Versions: 2.0.3 β β β ββ Tree Versions β β ββ 2.0.3 β β β ββ Dependents β ββ @humanwhocodes/config-array@npm:0.11.14 β ββ braces β ββ ID: 1098094 β ββ Issue: Uncontrolled resource consumption in braces β ββ URL: https://github.com/advisories/GHSA-grv7-fg5c-xmjg β ββ Severity: high β ββ Vulnerable Versions: <3.0.3 β β β ββ Tree Versions β β ββ 3.0.2 β β β ββ Dependents β ββ chokidar@npm:3.6.0 β ββ ejs β ββ ID: 1098366 β ββ Issue: ejs lacks certain pollution protection β ββ URL: https://github.com/advisories/GHSA-ghr5-ch3p-vcr6 β ββ Severity: moderate β ββ Vulnerable Versions: <3.1.10 β β β ββ Tree Versions β β ββ 3.1.8 β β β ββ Dependents β ββ nightwatch@npm:2.4.2 [87c89] β ββ glob β ββ ID: glob (deprecation) β ββ Issue: Glob versions prior to v9 are no longer supported β ββ Severity: moderate β ββ Vulnerable Versions: 7.2.0 β β β ββ Tree Versions β β ββ 7.2.0 β β β ββ Dependents β ββ mocha@npm:9.2.2 β ββ inflight β ββ ID: inflight (deprecation) β ββ Issue: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. β ββ Severity: moderate β ββ Vulnerable Versions: 1.0.6 β β β ββ Tree Versions β β ββ 1.0.6 β β β ββ Dependents β ββ glob@npm:7.2.3 β ββ loupe β ββ ID: loupe (deprecation) β ββ Issue: Please upgrade to 2.3.7 which fixes GHSA-4q6p-r6v2-jvc5 β ββ Severity: moderate β ββ Vulnerable Versions: 2.3.4 β β β ββ Tree Versions β β ββ 2.3.4 β β β ββ Dependents β ββ @nightwatch/chai@npm:5.0.2 β ββ micromatch β ββ ID: 1098615 β ββ Issue: Regular Expression Denial of Service (ReDoS) in micromatch β ββ URL: https://github.com/advisories/GHSA-952p-6rrq-rcjv β ββ Severity: moderate β ββ Vulnerable Versions: <=4.0.7 β β β ββ Tree Versions β β ββ 4.0.5 β β ββ 4.0.7 β β β ββ Dependents β ββ cspell-glob@npm:8.13.0 β ββ stylelint@npm:15.11.0 β ββ rimraf β ββ ID: rimraf (deprecation) β ββ Issue: Rimraf versions prior to v4 are no longer supported β ββ Severity: moderate β ββ Vulnerable Versions: 3.0.2 β β β ββ Tree Versions β β ββ 3.0.2 β β β ββ Dependents β ββ flat-cache@npm:3.2.0 β ββ tar β ββ ID: 1097493 β ββ Issue: Denial of service while parsing a tar file due to lack of folders count validation β ββ URL: https://github.com/advisories/GHSA-f5x3-32g6-xq36 β ββ Severity: moderate β ββ Vulnerable Versions: <6.2.1 β β β ββ Tree Versions β β ββ 6.2.0 β β β ββ Dependents β ββ node-gyp@npm:10.0.1 β ββ ws ββ ID: 1098392 ββ Issue: ws affected by a DoS when handling a request with many HTTP headers ββ URL: https://github.com/advisories/GHSA-3h5v-q93c-6h6q ββ Severity: high ββ Vulnerable Versions: >=8.0.0 <8.17.1 β ββ Tree Versions β ββ 8.15.1 β ββ Dependents ββ selenium-webdriver@npm:4.3.1
That means we want to update:
$ yarn npm audit -R ββ braces β ββ ID: 1098094 β ββ Issue: Uncontrolled resource consumption in braces β ββ URL: https://github.com/advisories/GHSA-grv7-fg5c-xmjg β ββ Severity: high β ββ Vulnerable Versions: <3.0.3 β β β ββ Tree Versions β β ββ 3.0.2 β β β ββ Dependents β ββ chokidar@npm:3.6.0 β ββ ejs β ββ ID: 1098366 β ββ Issue: ejs lacks certain pollution protection β ββ URL: https://github.com/advisories/GHSA-ghr5-ch3p-vcr6 β ββ Severity: moderate β ββ Vulnerable Versions: <3.1.10 β β β ββ Tree Versions β β ββ 3.1.8 β β β ββ Dependents β ββ nightwatch@npm:2.4.2 [87c89] β ββ micromatch β ββ ID: 1098615 β ββ Issue: Regular Expression Denial of Service (ReDoS) in micromatch β ββ URL: https://github.com/advisories/GHSA-952p-6rrq-rcjv β ββ Severity: moderate β ββ Vulnerable Versions: <=4.0.7 β β β ββ Tree Versions β β ββ 4.0.5 β β ββ 4.0.7 β β β ββ Dependents β ββ cspell-glob@npm:8.13.0 β ββ stylelint@npm:15.11.0 β ββ tar β ββ ID: 1097493 β ββ Issue: Denial of service while parsing a tar file due to lack of folders count validation β ββ URL: https://github.com/advisories/GHSA-f5x3-32g6-xq36 β ββ Severity: moderate β ββ Vulnerable Versions: <6.2.1 β β β ββ Tree Versions β β ββ 6.2.0 β β β ββ Dependents β ββ node-gyp@npm:10.0.1 β ββ ws ββ ID: 1098392 ββ Issue: ws affected by a DoS when handling a request with many HTTP headers ββ URL: https://github.com/advisories/GHSA-3h5v-q93c-6h6q ββ Severity: high ββ Vulnerable Versions: >=8.0.0 <8.17.1 β ββ Tree Versions β ββ 8.15.1 β ββ Dependents ββ selenium-webdriver@npm:4.3.1
- Assigned to spokje
- Status changed to Needs review
3 months ago 5:43pm 22 August 2024 - π³π±Netherlands spokje
Things got more involved with this one, after a
$ yarn up -R braces ejs micromatch tar ws
it turned outbraces
,ejs
andmicromatch
we're not updated.Next up, I tried removing the entry for each of them in
yarn.lock
and doing ayarn install
.
That worked formicromatch
, however that has a CVE stating we need to go3.0.8
or higher (See https://github.com/advisories/GHSA-952p-6rrq-rcjv). However the latest release is3.0.7
(See https://www.npmjs.com/package/micromatch).
So this one still gets flagged byyarn audit -R
, but as far as I can tell there's a mistake made in the CVE.Finally:
braces
,ejs
could only be bumped by usingresolutions
. I know this is not optimal, but at least this will only happen in version branches and not in main/11.xAlso they all have
resolutions
already, due to having an ancient nightwatch version. - Issue was unassigned.
- Status changed to RTBC
3 months ago 8:02pm 22 August 2024 - πΊπΈUnited States smustgrave
The reasoning in #25 I believe makes sense (js is not my strong area). But 11.0.x tests didn't break and updates for 11.x seem accepted.
- Status changed to Fixed
3 months ago 8:08pm 22 August 2024 Automatically closed - issue fixed for 2 weeks with no activity.