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

A high severity vulnerability introduced in your package #995

Closed
paimon0715 opened this issue Jul 23, 2021 · 11 comments
Closed

A high severity vulnerability introduced in your package #995

paimon0715 opened this issue Jul 23, 2021 · 11 comments

Comments

@paimon0715
Copy link

Hi, @iiroj @okonet, I’d like to report a vulnerability introduced in your package lint-staged:

Issue Description

A vulnerability CVE-2020-7707 detected in package property-expr<2.0.3 is transitively referenced by lint-staged@8.2.1. We noticed that such a vulnerability has been removed since lint-staged@9.0.0.

However, lint-staged's popular previous version lint-staged@8.2.1 (193,100 downloads per week) is still transitively referenced by a large amount of latest versions of active and popular downstream projects (about 162 downstream projects, e.g., @burst/cli 0.0.176, infini 0.2.15, cx-builder 0.0.53-54, wci-build 3.1.0, @ac-ui/react-components 2.0.6, @lenanpm/for9a@0.1.0, etc.).
As such, issue CVE-2020-7707 can be propagated into these downstream projects and expose security threats to them.

These projects cannot easily upgrade lint-staged from version 8.2.1 to (>=9.0.0). For instance, lint-staged@8.2.1 is introduced into the above projects via the following package dependency paths:
(1)@lenanpm/for9a@0.1.0 ➔ react-imgpro@1.4.1 ➔ lint-staged@8.2.1 ➔ yup@0.27.0 ➔ property-expr@1.5.1
......

The projects such as react-imgpro, which introduced lint-staged@8.2.1, are not maintained anymore. These unmaintained packages can neither upgrade lint-staged nor be easily migrated by the large amount of affected downstream projects.
On behalf the downstream users, could you help us remove the vulnerability from package lint-staged@8.2.1?

Suggested Solution

Since these inactive projects set a version constaint 8.2.* for lint-staged on the above vulnerable dependency paths, if lint-staged removes the vulnerability from 8.2.1 and releases a new patched version lint-staged@8.2.2, such a vulnerability patch can be automatically propagated into the 162 affected downstream projects.

In lint-staged@8.2.2, you can kindly try to perform the following upgrade:
yup ^0.27.0 ➔ ^0.28.2;
Note:
yup@0.28.2(>=0.28.2) directly depends on property-expr@2.0.4 (a vulnerability CVE-2020-7707 patched version)

Thank you for your contributions.

Best regards,
Paimon

@iiroj
Copy link
Member

iiroj commented Jul 23, 2021

Thanks for the issue! It's seems like a straightforward solution is to simply update yup as you suggested.

However, I'm not sure how to release patch version to a previous major release using semantic-release. Maybe it should be a manual release just in case. What do you think, @okonet?

@paimon0715
Copy link
Author

@iiroj Thanks for your feedback and help.

@okonet
Copy link
Collaborator

okonet commented Aug 10, 2021

I think creating a branch from a latest tagged version in question could work as expected with semantic release.

@paimon0715
Copy link
Author

@okonet Thanks a lot.

@iiroj
Copy link
Member

iiroj commented Aug 13, 2021

According to the semantic-release guide here, I pushed a 8.x branch here: https://github.com/okonet/lint-staged/tree/8.x.

However, version 8 still used Travis for the CI integration so this will essentially do nothing. I guess the easiest would be for you to locally make the version by checking out the branch and running npm version patch, and then publishing it to npm with npm publish --dry-run (dry-run first to see if it works). Then you can push the tag to GitHub, and we can delete the branch. We could then finally manually create the release notes for the new version 8.2.2.

What do you think, @okonet?

@okonet
Copy link
Collaborator

okonet commented Aug 14, 2021

Yep that makes sense

@bamboechop
Copy link

So, any update? Is there a v8 release with the fixes? Are you still trying to get the Travis CI setup up and running again? Was this declined and no fix will be provided? An update would be really nice. :)

@iiroj
Copy link
Member

iiroj commented Oct 14, 2021

I don't have permissions to publish myself, so @okonet would have to do it.

@lucasdavila
Copy link

Hello!

@okonet would it be possible to release a 8.2.2 version with this commit fa40de404356915bd53103e74d9aeccc037e7b56 updating yup to ^0.28.2 to fix a vulnerability in property-expr, since @iiroj don't have permission for that?

I will try to temporally point the package to the 8.x branch, but it would be ideally to be able to update it with a simple yarn update lint-staged.

Thank you! 🙌🏻

@okonet
Copy link
Collaborator

okonet commented Nov 7, 2022

Please update to latest. We don't support old releases since it's too much effort.

@make-github-pseudonymous-again

Can this be closed?

@iiroj iiroj closed this as not planned Won't fix, can't repro, duplicate, stale May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

6 participants