CVE-2022-24785CWE-22CWE-27

Path Traversal in Moment.js

High · published April 4, 2022

CVSS v3.1
7.5
EPSS
14%
Percentile
96.5
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS v3.1
7.5 · HIGH
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
CVSS v4.0
Not supplied
EPSS
0.13904 · 96.5th percentile
Weaknesses
CWE-22 · Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'); CWE-27 · Path Traversal: 'dir/../../filename'
Published
2022-04-04T00:00Z
EPSS history
Timeline
  • 04 APR 00:00Z
    Path Traversal in Moment.js
    cvelistv5