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 Wolfi
- CGA-25hc-q8m7-74wf
- CGA-2q25-5xxx-j5fm
- CGA-3qp4-jghx-7fgp
- CGA-45h6-653c-93cw
- CGA-77fr-w5p4-7f29
- CGA-7m4f-w4wj-rjgf
- CGA-8m87-vr32-jf44
- CGA-93c2-qhh6-825w
- CGA-9vc9-c7g7-p22q
- CGA-cgf3-5r4h-9qgg
- CGA-crjc-7rx3-r698
- CGA-g5wm-7mv3-272p
- CGA-g9fp-p6fc-p7ph
- CGA-gqvp-v2wx-xxcc
- CGA-h7f3-3mw8-jpf3
- CGA-jhpm-42xp-r24r
- CGA-p4r6-pxpx-73h8
- CGA-qxf9-x54g-4pg6
- CGA-rv38-q5mj-v7rx
- CGA-rw8v-qmmh-74cg
- CGA-rxm9-8gw3-66mh
- CGA-v66m-m6x7-qwp4
- CGA-whgq-946m-3cgv
- CGA-wmc6-cwh6-rhh4
- CGA-wxqq-4p5x-5r58
- CGA-xjr3-vg9x-x2pg