{"id":"GHSA-4p3w-j4w9-5jqw","revision":"aba112b47f814136871651c833fb94e7","records":[{"revision":"aba112b47f814136871651c833fb94e7","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-4p3w-j4w9-5jqw","aliases":["CVE-2026-17495"],"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()`.","state":0,"publishedAt":"2026-09-29T23:46:02+00:00","modifiedAt":"2026-09-30T00:00:03.8584662+00:00","affected":[{"ecosystem":"npm","name":"moment","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"2.29.2"},{"kind":"fixed","version":"2.31.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/moment/moment/security/advisories/GHSA-4p3w-j4w9-5jqw","https://nvd.nist.gov/vuln/detail/CVE-2026-17495","https://github.com/moment/moment/pull/6386","https://github.com/moment/moment/commit/5f7d983c9881e65e07574de9dda3190d99520c07","https://cna.openjsf.org/security-advisories.html","https://github.com/moment/moment","https://github.com/moment/moment/releases/tag/2.31.0"],"sourceUrl":"https://github.com/advisories/GHSA-4p3w-j4w9-5jqw","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-4p3w-j4w9-5jqw","identifiers":["GHSA-4p3w-j4w9-5jqw","CVE-2026-17495"]},"retained":false,"historicalAffected":[]}],"coverage":[]}