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

Dependency should be updated to avoid CVE-2022-24785 #979

Closed
urispmts opened this issue Apr 10, 2022 · 5 comments
Closed

Dependency should be updated to avoid CVE-2022-24785 #979

urispmts opened this issue Apr 10, 2022 · 5 comments

Comments

@urispmts
Copy link

There is a vulnerability in moment prior to version 2.29.2
The dependency of moment should be updated to avoid vulnerable versions.

See: Path Traversal: 'dir/../../filename' in moment.locale

@gaurav-quasar
Copy link

gaurav-quasar commented Apr 12, 2022

@urispmts,

I think you should be able to resolve it by updating your lock file by doing npm/yarn uninstall/install moment-timezone again.

Dependency mentioned in https://github.com/moment/moment-timezone/blob/develop/package.json#L31:

 "dependencies": {
		"moment": ">= 2.9.0"
	}

It should be able to pick up minor upgrade of 2.9.2.

@juliangruber
Copy link

If you need to upgrade the sub dependency and are using yarn, remove the entry moment@... from your yarn.lock and run yarn again, that should give you the updated version.

@urispmts
Copy link
Author

@gaurav-quasar @juliangruber Thanks. I already did this for my projects.
However, I suggested this as the new dependency to versions lower than 2.9.2, for instance, if you already had moment in your package.json and added moment-timezone (this should either upgrade it or fire an alert).

@sirgoofiguskid
Copy link

An automated pull request has it ready to go: #978

@ichernev
Copy link
Contributor

This is a dupe of #997

But yeah, there is a >= relationship, nothing in moment-timezone is FORCING you in using an insecure moment version. Just update your moment version and you'll be fine.

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

No branches or pull requests

5 participants