Security mailing lists by PureSourceCode

CVE-2022-24785

HIGH 7.5CVSS 3.1

Path Traversal: 'dir/../../filename' in moment.locale

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.

Published
4 Apr 2022
Last modified
10 Sep 2026
Assigned by
security-advisories@github.com
NVD status
Modified
Weakness
CWE-22CWE-27
Also known as
GHSA-8hfj-j24r-96c4
Sources
NVDJSONOSV GHSA-8hfj-j24r-96c4JSON

Scores

SourceScored byVersionScoreVector / decision
NVD security-advisories@github.com (Secondary) CVSS 3.1 HIGH 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NVD nvd@nist.gov (Primary) CVSS 3.1 HIGH 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
OSV GitHub CVSS 3.1 HIGH 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NVD nvd@nist.gov (Primary) CVSS 2.0 MEDIUM 5.0 AV:N/AC:L/Au:N/C:N/I:P/A:N

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD momentjs moment
cpe:2.3:a:momentjs:moment:*:*:*:*:*:node.js:*:*
>= 1.0.1, < 2.29.2 2.29.2
NVD momentjs moment
cpe:2.3:a:momentjs:moment:*:*:*:*:*:nuget:*:*
>= 1.0.1, < 2.29.2 2.29.2
NVD tenable tenable.sc
cpe:2.3:a:tenable:tenable.sc:*:*:*:*:*:*:*:*
< 5.21.0 5.21.0
NVD netapp active_iq
cpe:2.3:a:netapp:active_iq:-:*:*:*:*:*:*:*
(no version)
NVD fedoraproject fedora
cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
= 35
NVD fedoraproject fedora
cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*
= 36
NVD debian debian_linux
cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
= 10.0
OSV npm moment < 2.29.2 2.29.2
OSV NuGet Moment.js < 2.29.2 2.29.2

References

History

  • 25 Nov 2026 20:34 UTC · NVD: first stored (published 4 Apr 2022)
  • 25 Nov 2026 20:10 UTC · OSV: first stored (published 4 Apr 2022)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.