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 on moment.updateLocale #5914

Closed
davallen opened this issue Jul 19, 2021 · 5 comments
Closed

Security Vulnerability on moment.updateLocale #5914

davallen opened this issue Jul 19, 2021 · 5 comments

Comments

@davallen
Copy link

We have been flagged in multiple repos about the moment.updateLocale() function.

Guidance: - Calls to moment.updateLocale will slowly increase memory usage that is intentionally never freed, which can result in resource exhaustion.

It does not provide guidance on a particular version that this issue might have been fixed within. We are currently using 2.22.2.

Is there a version where this has been fixed? If not, is there a plan in place to address this issue?

@davallen
Copy link
Author

Any comment on this issue? This is a high priority for us.

@attritionorg
Copy link
Contributor

tag @ichernev

@ichernev
Copy link
Contributor

So if you have a java script array [] and call .push() on it, the memory keeps growing and is never reclaimed. So a malicious actor with access to .push() can wreck havoc and cause DoS.

updateLocale can be called with null as a second argument which undoes the update. It acts exactly like array push/pop.

May you elaborate what exactly is the issue here, because my simple mind can't comprehend it.

@davallen
Copy link
Author

Thanks for the reply. I am working with my internal open source team to understand better why they flagged this as a security issue.

@davallen
Copy link
Author

davallen commented Aug 4, 2021

Looks like it was mitigated in later version of package.

@davallen davallen closed this as completed Aug 4, 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

No branches or pull requests

3 participants