CVE-2022-24785Path Traversal in Moment.js
- 7.5HighCVSS base score
- 13.8%Exploitation in 30 daysEPSS · top 3.4% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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.
Timeline
ID reserved
By GitHub_M
- 53 days later
· 53 days later
Published
- 4 years later
· 4 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | High7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVDNVD · Modified | 3.1 | High7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
- EPSS (exploitation in 30 days)
- 13.8% · top 3.4% of all CVEs (18 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: yes · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 7.5.
Affected products
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- NuGetMoment.jsGHSA-8hfj-j24r-96c4 (opens in a new tab)
- npmmomentGHSA-8hfj-j24r-96c4 (opens in a new tab)
References
References8
- https://github.com/moment/moment/security/advisories/GHSA-8hfj-j24r-96c4 (opens in a new tab)x_transferred
- https://github.com/moment/moment/commit/4211bfc8f15746be4019bba557e29a7ba83d54c5 (opens in a new tab)x_transferred
- https://www.tenable.com/security/tns-2022-09 (opens in a new tab)x_transferred
- https://security.netapp.com/advisory/ntap-20220513-0006/ (opens in a new tab)x_transferred
- FEDORA-2022-85aa8e5706 (opens in a new tab)vendor-advisoryx_transferred
- FEDORA-2022-35b698150c (opens in a new tab)vendor-advisoryx_transferred
- [debian-lts-announce] 20230130 [SECURITY] [DLA 3295-1] node-moment security update (opens in a new tab)mailing-listx_transferred
- https://security.netapp.com/advisory/ntap-20241108-0002/ (opens in a new tab)
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2022-1677 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-8hfj-j24r-96c4 (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2022-24785)Record last updated .