Vulnerability
CVE-2026-17495
moment is a JavaScript date library for parsing, validating, manipulating, and formatting dates. In versions 2.29.2 through 2.30.1, a specially crafted non-string object passed to moment.locale() can bypass the locale-name path-traversal guard. The guard assumes the input is a string, so an object whose match() method satisfies the check while its toString() returns a traversal path reaches an internal require() call with attacker-controlled path segments. This is an incomplete fix for CVE-2022-24785 and primarily affects npm (server-side) users that pass user-provided input directly to moment.locale(). The issue is fixed in moment 2.31.0, and users should upgrade to 2.31.0 or later. As a workaround, validate that any user-supplied input is a string before passing it to moment.locale().
100 advisories report this vulnerability, across 9 ecosystems.
Advisories in Chainguard
- CGA-25hc-q8m7-74wf
- CGA-2m7g-jqfq-55rv
- CGA-2prw-p77p-8h8v
- CGA-2q25-5xxx-j5fm
- CGA-2v34-f9hm-hgx4
- CGA-3789-gwj7-5wxx
- CGA-3g2g-c258-vrqh
- CGA-3g6c-4c89-wc5h
- CGA-3gvg-2rmf-g8mj
- CGA-3qp4-jghx-7fgp
- CGA-3v3j-375x-r847
- CGA-3x2g-4m2m-vfhv
- CGA-45h6-653c-93cw
- CGA-4h9g-85c9-ph28
- CGA-4hr9-jv55-5jhx
- CGA-4jww-fgqh-w56m
- CGA-52h6-gc98-mfh7
- CGA-5578-4673-5r9x
- CGA-56qw-35c2-mqhx
- CGA-67x4-fq3j-fjg2
- CGA-6gm7-42jh-xpf5
- CGA-77fr-w5p4-7f29
- CGA-79v4-vj85-hf7p
- CGA-7jfc-8jc9-9546
- CGA-7jvr-3g6j-jh44
- CGA-7m4f-w4wj-rjgf
- CGA-85mj-mfgc-3399
- CGA-86qx-r4m2-5v24
- CGA-8966-mpg3-58gx
- CGA-8gr4-37q5-jq66
- CGA-8m87-vr32-jf44
- CGA-8whw-gw79-cx5f
- CGA-93c2-qhh6-825w
- CGA-9qx3-5wq5-6wvw
- CGA-9rx6-7c4q-65fp
- CGA-9vc9-c7g7-p22q
- CGA-c2vv-6cfj-jm9j
- CGA-cgf3-5r4h-9qgg
- CGA-cq8p-rpq4-j2c7
- CGA-crjc-7rx3-r698
- CGA-fqq2-rxc5-gpr3
- CGA-g5wm-7mv3-272p
- CGA-g9fp-p6fc-p7ph
- CGA-gqvp-v2wx-xxcc
- CGA-h248-f6wj-qrqj
- CGA-h7f3-3mw8-jpf3
- CGA-hc7x-6jp6-7mp3
- CGA-hj27-7cxx-c36f
- CGA-hx49-xwp2-253c
- CGA-j7vf-gvq7-6rpf
- CGA-jhp4-fvw6-3hvc
- CGA-jhpm-42xp-r24r
- CGA-m623-fg27-ppjh
- CGA-mhf8-v8x2-r6jh
- CGA-mhpc-h633-mq95
- CGA-mwq8-7j5c-5f54
- CGA-p2cv-gwc5-w2gc
- CGA-p4r6-pxpx-73h8
- CGA-p89x-9fpq-mf9v
- CGA-pmmr-69ff-7fc3
- CGA-ppf8-9gv5-mwcj
- CGA-q4m4-2fgq-qghj
- CGA-q9xp-vwm4-4f5f
- CGA-qc6c-f4xj-xjq7
- CGA-qxf9-x54g-4pg6
- CGA-r274-qq9h-hgqv
- CGA-r9wg-p922-38wc
- CGA-rv38-q5mj-v7rx
- CGA-rw8v-qmmh-74cg
- CGA-rwwr-mf8x-9g58
- CGA-rxm4-fgjv-v3v9
- CGA-rxm9-8gw3-66mh
- CGA-v66m-m6x7-qwp4
- CGA-vf84-q24p-53w8
- CGA-vpp2-jr9j-w8cc
- CGA-vv45-p2xp-9jc6
- CGA-vw25-pjv5-9w4q
- CGA-vw7m-qxmv-2228
- CGA-w4fv-c82j-w27j
- CGA-w7xh-7g53-fhf9
- CGA-w9fq-p6g6-44v9
- CGA-whgq-946m-3cgv
- CGA-wmc6-cwh6-rhh4
- CGA-wxqq-4p5x-5r58
- CGA-x555-h66p-p9v3
- CGA-x8cf-wfwj-fg32
- CGA-xjr3-vg9x-x2pg
- CGA-xm7m-h8qw-r2q9
- CGA-xrpp-76v4-mgxj
- CGA-xw28-7gxx-w6wg