First published: Mon Apr 04 2022(Updated: )
### Impact This vulnerability impacts npm (server) users of moment.js, especially if user provided locale string, eg `fr` is directly used to switch moment locale. ### Patches This problem is patched in 2.29.2, and the patch can be applied to all affected versions (from 1.0.1 up until 2.29.1, inclusive). ### Workarounds Sanitize user-provided locale name before passing it to moment.js. ### References _Are there any links users can visit to find out more?_ ### For more information If you have any questions or comments about this advisory: * Open an issue in [moment repo](https://github.com/moment/moment)
Credit: security-advisories@github.com security-advisories@github.com
Affected Software | Affected Version | How to fix |
---|---|---|
redhat/servicemesh-prometheus | <0:2.14.0-18.el8.1 | 0:2.14.0-18.el8.1 |
redhat/servicemesh-prometheus | <0:2.23.0-9.el8 | 0:2.23.0-9.el8 |
redhat/ceph | <2:16.2.10-94.el8c | 2:16.2.10-94.el8c |
redhat/eap7-hal-console | <0:3.3.12-1.Final_redhat_00001.1.el8ea | 0:3.3.12-1.Final_redhat_00001.1.el8ea |
redhat/eap7-hal-console | <0:3.3.12-1.Final_redhat_00001.1.el7ea | 0:3.3.12-1.Final_redhat_00001.1.el7ea |
redhat/rh-sso7-keycloak | <0:18.0.6-1.redhat_00001.1.el7 | 0:18.0.6-1.redhat_00001.1.el7 |
redhat/rh-sso7-keycloak | <0:18.0.6-1.redhat_00001.1.el8 | 0:18.0.6-1.redhat_00001.1.el8 |
redhat/rh-sso7-keycloak | <0:18.0.6-1.redhat_00001.1.el9 | 0:18.0.6-1.redhat_00001.1.el9 |
Momentjs Moment | >=1.0.1<2.29.2 | |
Momentjs Moment | >=1.0.1<2.29.2 | |
Tenable Tenable.sc | <5.21.0 | |
Netapp Active Iq | ||
Fedoraproject Fedora | =35 | |
Fedoraproject Fedora | =36 | |
Debian Debian Linux | =10.0 | |
nuget/Moment.js | <2.29.2 | 2.29.2 |
npm/moment | <2.29.2 | 2.29.2 |
redhat/moment v | <2.29.2 | 2.29.2 |
debian/node-moment | 2.29.1+ds-2+deb11u2 2.29.4+ds-1 |
Sanitize the user-provided locale name before passing it to Moment.js.
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
(Appears in the following advisories)
CVE-2022-24785 is a path traversal vulnerability in Moment.js that impacts npm (server) users.
The path traversal vulnerability in Moment.js impacts npm (server) users, especially if a user-provided locale string is directly used to switch moment locale.
Versions 1.0.1 to 2.29.1 of Moment.js are affected by CVE-2022-24785.
CVE-2022-24785 has a severity level of high (7).
To fix the path traversal vulnerability in Moment.js, update to version 2.29.2.