Home / moment / moment / CVE-2022-24785
CVE-2022-24785: is it exploited, and which versions of moment are affected and fixed?
CVE-2022-24785 is a path traversal (reading or writing files outside the intended folder) vulnerability in moment. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 17:09 UTC). Affected: moment before 2.29.2 and Moment.js before 2.29.2 (GitHub advisory GHSA-8hfj-j24r-96c4). Fixed in 2.29.2 (GitHub advisory GHSA-8hfj-j24r-96c4). Severity: High (7.5, CVSS 3.1, from GitHub_M).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 17:09 UTC, CVE record November 19, 2026, 07:14 UTC and NVD November 19, 2026, 07:49 UTC.
What is CVE-2022-24785?
Path Traversal in Moment.js
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.
From the CVE record by GitHub_M, last updated November 3, 2025, 21:46 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| moment | moment | >= 1.0.1, < 2.29.2 |
As the CVE record by GitHub_M states it, last updated November 3, 2025. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| npm | moment | < 2.29.2 | 2.29.2 | GHSA-8hfj-j24r-96c4 |
| NuGet | Moment.js | < 2.29.2 | 2.29.2 | GHSA-8hfj-j24r-96c4 |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated November 4, 2025. Summary: Path Traversal: 'dir/../../filename' in moment.locale.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| momentjs | moment | from 1.0.1 before 2.29.2 | application |
| tenable | tenable.sc | before 5.21.0 | application |
| netapp | active iq | all versions | application |
| fedoraproject | fedora | 35 | operating system |
| fedoraproject | fedora | 36 | operating system |
| debian | debian linux | 10.0 | operating system |
NVD analysis (status Modified), last modified June 17, 2026, 04:32 UTC.
How severe is CVE-2022-24785?
| Score | Version | Vector | Source |
|---|---|---|---|
| High 7.5 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N | GitHub_M |
| High 7.5 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N | NVD |
| Medium 5.0 | CVSS 2.0 | AV:N/AC:L/Au:N/C:N/I:P/A:N | NVD |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2022-24785 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- CISA SSVC
- Exploitation: none; automatable: yes; technical impact: partial (CISA ADP, April 23, 2025)
- EPSS
- 5.44% probability of exploitation activity in the next 30 days, percentile 92.9 (FIRST EPSS, scores of December 3, 2026)
What kind of flaw is it?
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory
- CWE-27 Path Traversal: 'dir/../../filename'
Where are the vendor advisories and 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-85aa8e5706 vendor-advisory
- FEDORA-2022-35b698150c vendor-advisory
- [debian-lts-announce] 20230130 [SECURITY] [DLA 3295-1] node-moment security update mailing-list
- https://security.netapp.com/advisory/ntap-20241108-0002/
When was it published, and where is the official record?
- Reserved
- February 10, 2022
- Published
- April 4, 2022, 00:00 UTC
- CVE record updated
- November 3, 2025, 21:46 UTC by GitHub_M
- NVD
- Modified, last modified June 17, 2026, 04:32 UTC
- Last checked
- CVE list November 19, 2026, 07:14 UTC; NVD November 19, 2026, 07:49 UTC; KEV December 3, 2026, 17:09 UTC; EPSS December 3, 2026
- Official record
- cve.org · NVD
What other CVEs affect moment?
- Sep 15, 2026CVE-2026-17495 moment: path Traversal: 'dir/../../filename'
- Jul 6, 2022CVE-2022-31129 moment: denial of service (uncontrolled resource consumption)
Questions about CVE-2022-24785
Is CVE-2022-24785 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 17:09 UTC. FIRST's EPSS gives it a 5.44% chance of exploitation activity in the next 30 days (scores of December 3, 2026).
Which versions of moment are affected by CVE-2022-24785?
moment before 2.29.2 and Moment.js before 2.29.2, per the GitHub advisory GHSA-8hfj-j24r-96c4. The tables above give every range the sources list.
Which version fixes CVE-2022-24785?
2.29.2, per the GitHub advisory GHSA-8hfj-j24r-96c4. Check the vendor's advisory before you rely on it.
How severe is CVE-2022-24785?
High (7.5, CVSS 3.1, from GitHub_M). The severity table above shows each score with its source.
Where is the official record of CVE-2022-24785?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.