{"api_version":"1","generated_at":"2026-09-15T07:47:35+00:00","cve":"CVE-2026-17495","urls":{"html":"https://cve.report/CVE-2026-17495","api":"https://cve.report/api/cve/CVE-2026-17495.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-17495","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-17495"},"summary":{"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().","state":"PUBLISHED","assigner":"openjs","published_at":"2026-09-15 06:16:57","updated_at":"2026-09-15 06:16:57"},"problem_types":["CWE-27","CWE-27 CWE-27: Path Traversal: 'dir/../../filename'"],"metrics":[{"version":"3.1","source":"ce714d77-add3-4f53-aff5-83d477b104bb","type":"Secondary","score":"5.9","severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","baseScore":5.9,"baseSeverity":"MEDIUM","attackVector":"NETWORK","attackComplexity":"HIGH","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"HIGH","availabilityImpact":"NONE"}},{"version":"3.1","source":"CNA","type":"CVSS","score":"5.9","severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","data":{"baseScore":5.9,"baseSeverity":"MEDIUM","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","version":"3.1"}}],"references":[{"url":"https://cna.openjsf.org/security-advisories.html","name":"https://cna.openjsf.org/security-advisories.html","refsource":"ce714d77-add3-4f53-aff5-83d477b104bb","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/moment/moment/security/advisories/GHSA-4p3w-j4w9-5jqw","name":"https://github.com/moment/moment/security/advisories/GHSA-4p3w-j4w9-5jqw","refsource":"ce714d77-add3-4f53-aff5-83d477b104bb","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-17495","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-17495","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"moment","product":"moment","version":"affected 2.29.2 2.31.0 semver","platforms":[]},{"source":"CNA","vendor":"moment","product":"moment","version":"unaffected 2.31.0 semver","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[{"source":"CNA","value":"zolbooo","lang":"en"},{"source":"CNA","value":"UlisesGascon","lang":"en"},{"source":"CNA","value":"gilmoreorless","lang":"en"},{"source":"CNA","value":"mattjohnsonpint","lang":"en"}],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","packageURL":"pkg:npm/moment","product":"moment","vendor":"moment","versions":[{"lessThan":"2.31.0","status":"affected","version":"2.29.2","versionType":"semver"},{"status":"unaffected","version":"2.31.0","versionType":"semver"}]}],"credits":[{"lang":"en","type":"reporter","value":"zolbooo"},{"lang":"en","type":"remediation developer","value":"UlisesGascon"},{"lang":"en","type":"coordinator","value":"gilmoreorless"},{"lang":"en","type":"remediation developer","value":"mattjohnsonpint"}],"descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"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()."}],"value":"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()."}],"metrics":[{"cvssV3_1":{"baseScore":5.9,"baseSeverity":"MEDIUM","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","version":"3.1"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-27","description":"CWE-27: Path Traversal: 'dir/../../filename'","lang":"en","type":"CWE"}]}],"providerMetadata":{"dateUpdated":"2026-09-15T05:40:55.263Z","orgId":"ce714d77-add3-4f53-aff5-83d477b104bb","shortName":"openjs"},"references":[{"url":"https://github.com/moment/moment/security/advisories/GHSA-4p3w-j4w9-5jqw"},{"url":"https://cna.openjsf.org/security-advisories.html"}],"title":"moment vulnerable to Path Traversal via crafted non-string locale name","x_generator":{"engine":"cve-kit 1.0.0"}}},"cveMetadata":{"assignerOrgId":"ce714d77-add3-4f53-aff5-83d477b104bb","assignerShortName":"openjs","cveId":"CVE-2026-17495","datePublished":"2026-09-15T05:40:55.263Z","dateReserved":"2026-07-26T13:49:41.562Z","dateUpdated":"2026-09-15T05:40:55.263Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-09-15 06:16:57","lastModifiedDate":"2026-09-15 06:16:57","problem_types":["CWE-27","CWE-27 CWE-27: Path Traversal: 'dir/../../filename'"],"metrics":{"cvssMetricV31":[{"source":"ce714d77-add3-4f53-aff5-83d477b104bb","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","baseScore":5.9,"baseSeverity":"MEDIUM","attackVector":"NETWORK","attackComplexity":"HIGH","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"HIGH","availabilityImpact":"NONE"},"exploitabilityScore":2.2,"impactScore":3.6}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"17495","Ordinal":"1","Title":"moment vulnerable to Path Traversal via crafted non-string local","CVE":"CVE-2026-17495","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"17495","Ordinal":"1","NoteData":"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().","Type":"Description","Title":"moment vulnerable to Path Traversal via crafted non-string local"}]}}}