Vulnerability · CVE-2022-24785
momentjs moment Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Published Jul 25, 2024 · catalog updated Jul 25, 2024 · momentjs moment Improper Limitation
Patch now
CVE-2022-24785 is in the CISA known-exploited catalog. Confirm momentjs moment Improper Limitation against the vendor advisory and apply that fix. The CVSS score does not change the priority.
Gaps on this record
- The stored product name is a package slug. The name on this page is taken from the title (momentjs moment Improper Limitation).
- No version range is stored. A customer cannot check an installed version against this record.
- Severity
- Unknown—
- Known exploitation
- CISA KEV and VulnCheck KEV
- EPSS
- 13.90%
- Remediation
- Remediation guidance
- Affected products
- vendor momentjs moment
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.
Are you affected?
Enter the version you run. The result uses only the ranges stored on this record.
The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.
- vendor momentjs momentversion unspecified
How to fix CVE-2022-24785
Recommended remediation
Apply remediations or mitigations per vendor instructions or discontinue use of the product if remediation or mitigations are unavailable.
Official advisories
What to do
Three questions, each answered from this record only. Confirm the vendor advisory before you patch.
Should you patch?
CVE-2022-24785 is in the CISA known-exploited catalog. Confirm momentjs moment Improper Limitation against the vendor advisory and apply that fix. The CVSS score does not change the priority.
Which versions are affected?
Affected version ranges are not on this record. Apply remediations or mitigations per vendor instructions or discontinue use of the product if remediation or mitigations are unavailable.
What should an analyst verify?
No weakness class is stored. EPSS 13.90%. The CISA KEV listing is the exploitation evidence. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.
Code
The project this record applies to. Exploit listings stay in References.
No public source repository is identified for this product.
Timeline
Detection, updates, and resolution for this record.
Jul 25, 2024 · VulnCheck KEV
Detected
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, s
Jul 25, 2024 · CISA KEV
Known exploited
Apply remediations or mitigations per vendor instructions or discontinue use of the product if remediation or mitigations are unavailable.
Sources
- CVE.orgVulnerability recordCVE-2022-24785
Official CVE identifier
cve.org - FIRST EPSSExploitation probabilityCVE-2022-24785
30-day exploitation probability 13.9%
first.org - VulnCheck KEVConfirmed exploitationCVE-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 mom
vulncheck.com
References
Freshness
Last verified in this catalog Oct 18, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.