CVE-2022-24785

Path Traversal in Moment.js

HIGH
7.5
CVSS Score
Published: April 4, 2022 at 12:00 AM UTC
Updated: June 17, 2026 at 04:32 AM UTC
6 products affected across 6 vendorsDebian LinuxFedoraTenable.Sc

Using moment by moment?

Get instant alerts when new vulnerabilities affect moment - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.5
Exploit prediction
EPSS 14%
SSVC
No known exploit

Description

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

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

1.0.1 ≤ v < 2.29.2
Affected range stops below 2.29.2, so it looks safe — our inference, not a vendor statement
All versions
v < 5.21.0
Affected range stops below 5.21.0, so it looks safe — our inference, not a vendor statement
v < 2.29.2
Affected range stops below 2.29.2, so it looks safe — our inference, not a vendor statement

SSVC — Action Prioritization

SSVCNo known exploitAutomatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

7.5HIGHGitHub_M
Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
HIGH
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-22CWE-27

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card