Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump ssri dependency from 6.0.1 to 6.0.2 to address CVE-2021-27290 #49

Closed
wants to merge 1 commit into from

Conversation

Zajn
Copy link

@Zajn Zajn commented Mar 26, 2021

This bumps ssri to 6.0.2 to address CVE-2021-27290. The original issue was closed after 15.0.6 was released, but many people rely on v12 due to usage of Webpack 4.

References

Related to #47

@Zajn
Copy link
Author

Zajn commented Mar 26, 2021

Hi, I'm hoping this might help get the ssri bump backported to v12, which I think many people rely on due to Webpack v4.

I tried to follow a CI example for testing and tests appeared to pass for me locally using:
Node v12.21.0
npm v7.7.5

I can see, however, that all CI checks have failed.

package.json Outdated
@@ -71,7 +71,7 @@
"move-concurrently": "^1.0.1",
"promise-inflight": "^1.0.1",
"rimraf": "^2.6.3",
"ssri": "^6.0.1",
"ssri": "^8.0.1",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v6.0.2 is released, we should be able to use that here.

npm/ssri#18 (comment)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks! I'll update and hopefully that'll break fewer tests :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That did the trick!

@Zajn Zajn force-pushed the zajn/backport-ssri-update branch from 2c76729 to 2ddd6f1 Compare April 7, 2021 21:53
@Zajn Zajn changed the title Bump ssri dependency from 6.0.1 to 8.0.1 to address CVE-2021-27290 Bump ssri dependency from 6.0.1 to 6.0.2 to address CVE-2021-27290 Apr 7, 2021
@pedelman
Copy link

pedelman commented Apr 7, 2021

@isaacs @wraithgar @claudiahdz

Appreciate if someone can help take a look at this PR, it should resolve CVE-2021-27290 now that ssri has back ported the regex fix to v6.0.2. This change is important for webpack v4 users, more discussion here: webpack-contrib/terser-webpack-plugin#388.

Also I noticed that the Contributor Guide link in the README is no longer working, please inform if there are any additional steps for this!

Thank you 😄

@wraithgar
Copy link
Member

This PR is still on our radar, but since we published ssri@6.0.2 users already have a path to resolution.

Webpack 4 users who are keeping current on their subdependencies will get the proper ssri version now:

~/D/n/t $ npm i webpack@4 --loglevel silent
~/D/n/t $ npm ls ssri
t@1.0.0 /Users/wraithgar/Development/npm/t
└─┬ webpack@4.46.0
  └─┬ terser-webpack-plugin@1.4.5
    └─┬ cacache@12.0.4
      └── ssri@6.0.2

@G-Rath
Copy link

G-Rath commented Apr 18, 2021

@wraithgar

This PR is still on our radar, but since we published ssri@6.0.2 users already have a path to resolution.

Only in some cases - later versions of terser-webpack-plugin pull in higher versions of cacache, including ones that pull in ssri@7, which hasn't been backported yet; while webpack is pulling in v1 of the terser plugin, it seems a lot of other ecosystems are pulling in the higher versions (i.e laravel-mix, which provides webpack for PHP Laravel apps, and @rails/webpacker which provides webpack for Ruby on Rails apps).

I've opened npm/ssri#20 backporting the fix to v7 - if we could get that landed then I think we can say the majority (if not all) of users should have an easy path to resolution :)

@nlf
Copy link
Contributor

nlf commented Aug 26, 2021

closing. semver is already ensuring that users who install cacache@12 will receive an up to date and patched ssri dependency, this change is effectively nothing but updating the package-lock.json in the repo which is unnecessary since it's not a part of the published package anyway.

a fix was backported to ssri@7 which closes the loop on the rest of the concerns noted in this issue.

@nlf nlf closed this Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants