{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-17495","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 int","descriptionLong":"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().","published":"2026-09-15T05:40:55.263Z","updated":"2026-10-28T02:30:40.486371684Z","reserved":"2026-07-26T13:49:41.562Z","status":"Awaiting Analysis","rejected":false,"assigner":"openjs","metric":{"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","rating":"medium","source":"openjs"},"metrics":[{"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","rating":"medium","source":"openjs"},{"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","rating":"medium","source":"ce714d77-add3-4f53-aff5-83d477b104bb"},{"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","rating":"medium","source":"OSV"},{"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","rating":"medium","source":"GitHub"}],"rating":"medium","products":["moment"],"affectedProducts":[{"vendor":"moment","product":"moment","defaultStatus":"unaffected","versions":[{"versionType":"semver","status":"affected","version":"2.29.2","lessThan":"2.31.0"},{"versionType":"semver","status":"unaffected","version":"2.31.0"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"moment","purl":"pkg:npm/moment","ranges":[">=2.29.2 <2.31.0"],"fixed":["2.31.0"],"advisory":"GHSA-4p3w-j4w9-5jqw"}],"cwes":["CWE-27"],"aliases":["GHSA-4p3w-j4w9-5jqw"],"references":[{"url":"https://github.com/moment/moment/security/advisories/GHSA-4p3w-j4w9-5jqw","tags":["advisory","web"]},{"url":"https://cna.openjsf.org/security-advisories.html","tags":["advisory","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/17xxx/CVE-2026-17495.json","tags":["advisory"]},{"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","tags":["package"]},{"url":"https://github.com/moment/moment/releases/tag/2.31.0","tags":["web"]}],"patchReferenced":false,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00519,"epssPercentile":0.449,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-17495","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-17495","ok":true,"note":"Awaiting Analysis"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-17495","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-4p3w-j4w9-5jqw","ok":true,"note":"GHSA-4p3w-j4w9-5jqw"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-17495","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}