CVE-2022-24785

published 4 Apr 2022 · updated 3 Nov 2025

Path Traversal in Moment.js

8.0HighCVSS 7.5EPSS 14%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 14%. No fixed version is recorded.

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.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
moment>=1.0.1 <2.29.2

Timeline

Every event on this vulnerability

Embed

A live severity badge for an advisory, README or ticket

CVE-2022-24785 severity on Zeptric[![CVE-2022-24785](https://zeptric.io/badge/cve/CVE-2022-24785.svg)](https://zeptric.io/cve/CVE-2022-24785)