Path Traversal in Moment
CVE-2022-24785
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.
Vulnerability class: Path Traversal (Directory Traversal)
Published · last modified .
CVSS v3 metric
CVSS v3 base score 7.5 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
EPSS exploit prediction
EPSS: 0.139 (96.5th percentile), scored .
Moderate probability of exploitation in the next 30 days — watch for active exploitation reports. 97th percentile — 96.5% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.
EPSS over last 30 days · oldest: 0.139 · newest: 0.139 · change: 0.000
Affected products
- Moment — versions >= 1.0.1, < 2.29.2
- Momentjs Moment
- NetApp Active Iq
- Tenable Tenable.sc
- Debian Linux — versions 10.0
- Fedoraproject Fedora — versions 35, 36
Weakness classification (CWE)
Public proof-of-concept exploits
References
- github.com/moment/moment/security/advisories/GHSA-8hfj-j24r-96c4 (Vendor Advisory)
- github.com/moment/moment/commit/4211bfc8f15746be4019bba557e29a7ba83d54c5 (Patch)
- www.tenable.com/security/tns-2022-09 (Patch, Third Party Advisory, Release Notes)
- security.netapp.com/advisory/ntap-20220513-0006/ (Third Party Advisory)
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/… (vendor-advisory)
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/… (vendor-advisory)
- lists.debian.org/debian-lts-announce/2023/01/msg00035.html (mailing-list, Mailing List, Third Party Advisory)
- af854a3a-2127-422b-91ae-364da2661108
Frequently asked questions
- What is CVE-2022-24785?
- CVE-2022-24785 is a high-severity vulnerability in Moment, classified under Path Traversal. CVSS score: 7.5/10. Published 2022-04-04.
- How severe is CVE-2022-24785?
- High severity. CVSS v3 base score is 7.5 out of 10.
- Is CVE-2022-24785 known to be exploited?
- 12 public proof-of-concept repositories are indexed. Not currently listed in the CISA KEV catalog.