CVE-2022-24785
Path Traversal in Moment.js
- State
- Published
- Severity
- 7.5 High
- Published
- Apr 4, 2022
- Updated
- Nov 3, 2025
- Reserved
- Feb 10, 2022
Description
Moment.js is a JavaScript date library for parsing, validating, manipulating, and formatting dates. A path traversal vulnerability impacts npm (server) users of Moment.js between versions 1.0.1 and 2.29.1, especially if a user-provided locale string is directly used to switch moment locale. This problem is patched in 2.29.2, and the patch can be applied to all affected versions. As a workaround, sanitize the user-provided locale name before passing it to Moment.js.
Scores
| CVSS | Score | Vector | Source |
|---|---|---|---|
| 3.1 | 7.5 High | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N | GitHub_M |
Weaknesses
Affected Products
| Product | Versions |
|---|---|
momentmoment |
|
References
- https://github.com/moment/moment/security/advisories/GHSA-8hfj-j24r-96c4
- https://github.com/moment/moment/commit/4211bfc8f15746be4019bba557e29a7ba83d54c5
- https://www.tenable.com/security/tns-2022-09
- https://security.netapp.com/advisory/ntap-20220513-0006/
- FEDORA-2022-85aa8e5706vendor-advisory
- FEDORA-2022-35b698150cvendor-advisory
- [debian-lts-announce] 20230130 [SECURITY] [DLA 3295-1] node-moment security updatemailing-list
- https://security.netapp.com/advisory/ntap-20241108-0002/
Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.