{"id":"CVE-2026-17495","aliases":["CLSA-2026-1793190763","DEBIAN-CVE-2026-17495","EUVD-2026-78277","GHSA-4p3w-j4w9-5jqw","UBUNTU-CVE-2026-17495"],"status":"published","title":"moment vulnerable to Path Traversal via crafted non-string locale name","description":"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().","severity":{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00519,"percentile":0.44473,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-27"],"published":"2026-09-15T05:40:55Z","modified":"2026-10-28T13:45:02Z","fixes":[{"ecosystem":"npm","package":"moment","fixed_in":["2.31.0"],"sources":["ghsa","osv"]},{"ecosystem":"TuxCare:npm","package":"moment","fixed_in":["2.30.1-tuxcare.1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"node-moment","fixed_in":["2.31.0+ds1-1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"moment","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.29.2"},{"fixed":"2.31.0"}]}]},{"source":"osv","ecosystem":"TuxCare:npm","package":"moment","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.30.1-tuxcare.0"},{"fixed":"2.30.1-tuxcare.1"}]}],"versions":["2.30.1"]},{"source":"osv","ecosystem":"Debian:12","package":"node-moment","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.29.4+ds-1","2.30.1+ds-1","2.30.1+ds1-1","2.30.1+ds1-2","2.30.1+ds1-3","2.31.0+ds1-1"]},{"source":"osv","ecosystem":"Debian:13","package":"node-moment","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.29.4+ds-1","2.30.1+ds-1","2.30.1+ds1-1","2.30.1+ds1-2","2.30.1+ds1-3","2.31.0+ds1-1"]},{"source":"osv","ecosystem":"Debian:14","package":"node-moment","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.31.0+ds1-1"}]}],"versions":["2.29.4+ds-1","2.30.1+ds-1","2.30.1+ds1-1","2.30.1+ds1-2","2.30.1+ds1-3"]},{"source":"osv","ecosystem":"npm","package":"moment","ranges":[{"type":"SEMVER","events":[{"introduced":"2.29.2"},{"fixed":"2.31.0"}]}]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"node-moment","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.10.6+dfsg-1","2.11.0+ds-1","2.11.0+ds-1ubuntu0.1~esm1"]},{"source":"osv","ecosystem":"Ubuntu:18.04:LTS","package":"node-moment","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.18.1+ds-1","2.19.1+ds-1","2.19.2+ds-1","2.19.3+ds-1","2.19.4+ds-1","2.20.1+ds-1","2.20.1+ds-1ubuntu0.1"]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"node-moment","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.24.0+ds-1","2.24.0+ds-2","2.24.0+ds-2ubuntu0.1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"node-moment","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.29.1+ds-2","2.29.1+ds-3","2.29.1+ds-3ubuntu0.2"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"python-xstatic-moment","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.8.4.2-2"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"node-moment","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.29.4+ds-1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"python-xstatic-moment","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.8.4.2-3"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"node-moment","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.30.1+ds-1","2.30.1+ds1-3"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"python-xstatic-moment","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.8.4.2-6"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"node-moment","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.29.4+ds-1","2.30.1+ds-1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"python-xstatic-moment","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.8.4.2-4","2.8.4.2-6"]}],"products":[{"vendor":"moment","product":"moment"}],"references":[{"url":"https://github.com/moment/moment/security/advisories/GHSA-4p3w-j4w9-5jqw","tags":["advisory","web","report"]},{"url":"https://cna.openjsf.org/security-advisories.html","tags":["advisory","web","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-17495","tags":["advisory"]},{"url":"https://github.com/moment/moment/pull/6386","tags":["web"]},{"url":"https://github.com/moment/moment/commit/5f7d983c9881e65e07574de9dda3190d99520c07","tags":["web"]},{"url":"https://github.com/moment/moment/releases/tag/2.31.0","tags":["web"]},{"url":"https://github.com/advisories/GHSA-4p3w-j4w9-5jqw"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/17xxx/CVE-2026-17495.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-17495","tags":["advisory"]},{"url":"https://github.com/moment/moment","tags":["package"]},{"url":"https://ubuntu.com/security/CVE-2026-17495","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-17495","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2026-17495","title":"moment vulnerable to Path Traversal via crafted non-string locale name","description":"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().","status":"published","published":"2026-09-15T05:40:55.263Z","modified":"2026-09-15T17:49:57.391Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-27"],"updated_at":"2026-11-02T14:19:54.50686Z"}],"euvd":[{"id":"EUVD-2026-78277","description":"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().","status":"published","published":"2026-09-15T05:40:55Z","modified":"2026-09-15T17:49:57Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"medium"}],"updated_at":"2026-11-02T17:28:17.333425Z"}],"ghsa":[{"id":"GHSA-4p3w-j4w9-5jqw","title":"moment vulnerable to Path Traversal via crafted non-string locale name","description":"### Impact\n\nmoment 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](https://github.com/moment/moment/security/advisories/GHSA-8hfj-j24r-96c4).\n\nThis affects server-side (npm) users only. Plain string input is not affected: the existing validation correctly rejects strings that contain path separators.\n\n### Patches\n\nThis issue is patched in moment 2.31.0.\n\n### Workarounds\n\nValidate that any user-supplied input is a string before passing it to `moment.locale()`.","status":"published","published":"2026-09-29T23:46:02Z","modified":"2026-09-29T23:46:04Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"medium"}],"cwes":["CWE-27"],"updated_at":"2026-11-02T14:41:23.783773Z"}],"nvd":[{"id":"CVE-2026-17495","description":"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().","status":"published","published":"2026-09-15T06:16:57.597Z","modified":"2026-09-16T19:40:00.317Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"medium","assessor":"secondary"}],"cwes":["CWE-27"],"updated_at":"2026-11-02T14:12:47.335523Z"}],"osv":[{"id":"CVE-2026-17495","title":"moment vulnerable to Path Traversal via crafted non-string locale name","description":"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().","status":"published","published":"2026-09-15T05:40:55.263Z","modified":"2026-10-28T02:30:40.486371684Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"medium"}],"cwes":["CWE-27"],"updated_at":"2026-11-02T15:44:57.682091Z"},{"id":"DEBIAN-CVE-2026-17495","description":"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().","status":"published","published":"2026-09-15T06:16:57.597Z","modified":"2026-10-01T03:02:52.24007721Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"medium"}],"updated_at":"2026-11-02T15:45:52.562592Z"},{"id":"GHSA-4p3w-j4w9-5jqw","title":"moment vulnerable to Path Traversal via crafted non-string locale name","description":"### Impact\n\nmoment 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](https://github.com/moment/moment/security/advisories/GHSA-8hfj-j24r-96c4).\n\nThis affects server-side (npm) users only. Plain string input is not affected: the existing validation correctly rejects strings that contain path separators.\n\n### Patches\n\nThis issue is patched in moment 2.31.0.\n\n### Workarounds\n\nValidate that any user-supplied input is a string before passing it to `moment.locale()`.","status":"published","published":"2026-09-29T23:46:02Z","modified":"2026-09-30T00:00:03.858466235Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"medium"}],"cwes":["CWE-27"],"updated_at":"2026-11-02T15:46:37.148947Z"},{"id":"UBUNTU-CVE-2026-17495","description":"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().","status":"published","published":"2026-09-15T06:16:00Z","modified":"2026-10-17T12:59:53.249798951Z","cvss":[{"version":"3.1","score":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","level":"medium"}],"updated_at":"2026-11-02T16:56:00.592716Z"},{"id":"CLSA-2026-1793190763","title":"TuxCare security update for moment (1 CVE)","description":"TuxCare rebuilt moment to address 1 CVE. Fixed in 2.30.1-tuxcare.1.","status":"published","published":"2026-10-28T12:32:43Z","modified":"2026-10-28T13:45:02.684143562Z","updated_at":"2026-11-02T15:43:55.34846Z"}]}}
