CVE-2026-17495
ADVISORY - githubSummary
Impact
moment before 2.31.0 is vulnerable to path traversal in moment.locale(). When an application passes a non-string, attacker-influenced value to moment.locale(), a specially crafted object can bypass the locale name validation and cause moment to load a file from an attacker-controlled path. This is a further bypass of the validation added in 2.29.2 for CVE-2022-24785.
This affects server-side (npm) users only. Plain string input is not affected: the existing validation correctly rejects strings that contain path separators.
Patches
This issue is patched in moment 2.31.0.
Workarounds
Validate that any user-supplied input is a string before passing it to moment.locale().
Common Weakness Enumeration (CWE)
Path Traversal: 'dir/../../filename'
Path Traversal: 'dir/../../filename'
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
NIST
2.2
CVSS SCORE
5.9mediumGitHub
2.2
CVSS SCORE
5.9mediumDebian
-
Ubuntu
-
CVSS SCORE
N/AmediumRed Hat
2.2
CVSS SCORE
5.9mediumChainguard
CGA-v94f-c5qh-4gvv
-
Docker Hardened Images
2.2
CVSS SCORE
5.9mediumminimos
MINI-2wmq-xrc8-r6hf
-
minimos
MINI-3phx-mfrv-xgpw
-
minimos
MINI-4cf7-xh75-7fvf
-
minimos
MINI-4h2g-5w43-fc6r
-
minimos
MINI-4m2q-ccx2-45g6
-
minimos
MINI-59m9-r8jc-g52x
-
minimos
MINI-5pp7-fvwj-mxfj
-
minimos
MINI-5q54-fv7p-h8mh
-
minimos
MINI-68m2-7v46-68wf
-
minimos
MINI-697x-8m33-w3g4
-
minimos
MINI-6vjm-wh83-v46w
-
minimos
MINI-fhrr-xmjq-qmg7
-
minimos
MINI-fjqw-4hx6-5w82
-
minimos
MINI-hc9v-r3x2-29qw
-
minimos
MINI-hffx-q3j3-7xc7
-
minimos
MINI-hw75-pg2h-6v37
-
minimos
MINI-hx2v-qc4c-v969
-
minimos
MINI-jj5g-m6ph-m457
-
minimos
MINI-mcp7-vr75-r273
-
minimos
MINI-vcm6-5wrx-p4p3
-
minimos
MINI-vfpc-pqh3-97h4
-
minimos
MINI-w55w-3725-5q26
-
minimos
MINI-wgqh-hpcg-qcgg
-
minimos
MINI-x82p-8w5h-fq58
-
minimos
MINI-xrcv-r223-r67r
-