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

Security vulnerability due to obsolete moment version #997

Closed
VB-at-Bis opened this issue Aug 21, 2022 · 5 comments
Closed

Security vulnerability due to obsolete moment version #997

VB-at-Bis opened this issue Aug 21, 2022 · 5 comments

Comments

@VB-at-Bis
Copy link

Moment-timezone version which you use:

Version: 0.5.34

Issue description:

Security vulnerability reported in our private repository due to moment-timezone.
Please see advisory GHSA-wc69-rhjr-hc9g "Inefficient Regular Expression Complexity in moment".
Current version of moment-timezone uses moment 2.9.0 . Please update dependency to at least 2.29.4 to fix the vulnerability.

@ichernev
Copy link
Contributor

It can work with any version above 2.9.0. As long as you update moment you're good. If we place 2.29.4, all people who want to use an older version of moment won't be able to do it. Aren't tools smart enough to know what is == and what is >= (or for that matter, people...)

@nickdnk
Copy link

nickdnk commented Sep 1, 2022

yarn audit also complains about this which is a compliance issue. Can't we just release a version that has the proper requirement? This is on 0.5.37.

Edit: Yes, I know it doesn't matter, but compliance people don't understand this. They see "high risk vulnerability = bad".

@gilmoreorless
Copy link
Member

If you've upgraded moment to 2.29.4 elsewhere in your project, you can use npx yarn-deduplicate --packages moment to make sure moment-timezone also uses the same version. #982 (comment) contains a lot more detail (it's for a slightly different problem, but the underlying cause is the same).

Ideally we'd make moment a peer dependency instead of a core dependency, but that's a breaking change.

@sergei-lobanov
Copy link

any possible solutions or updates on this?

@gilmoreorless
Copy link
Member

Fixed in version 0.5.41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants