{"id":"CVE-2022-24785","aliases":["CVE-2022-24785","GHSA-8hfj-j24r-96c4"],"related":[],"kind":"vulnerability","state":"published","title":"Path Traversal in Moment.js","summary":"Moment.js is a JavaScript date library for parsing, validating, manipulating, and formatting dates. A path traversal vulnerability impacts npm (server) users of Moment.js between versions 1.0.1 and 2.29.1, especially if a user-provided locale string is directly used to switch moment locale. This problem is patched in 2.29.2, and the patch can be applied to all affected versions. As a workaround, sanitize the user-provided locale name before passing it to Moment.js.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Moment.js is a JavaScript date library for parsing, validating, manipulating, and formatting dates. A path traversal vulnerability impacts npm (server) users of Moment.js between versions 1.0.1 and 2.29.1, especially if a user-provided locale string is directly used to switch moment locale. This problem is patched in 2.29.2, and the patch can be applied to all affected versions. As a workaround, sanitize the user-provided locale name before passing it to Moment.js.","source":"cvelist"},{"lang":"en","text":"### Impact\nThis vulnerability impacts npm (server) users of moment.js, especially if user provided locale string, eg `fr` is directly used to switch moment locale.\n\n### Patches\nThis problem is patched in 2.29.2, and the patch can be applied to all affected versions (from 1.0.1 up until 2.29.1, inclusive).\n\n### Workarounds\nSanitize user-provided locale name before passing it to moment.js.\n\n### References\n_Are there any links users can visit to find out more?_\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [moment repo](https://github.com/moment/moment)","format":"markdown","source":"ghsa"},{"lang":"es","text":"Moment.js es una librería de fechas en JavaScript para analizar, comprobar, manipular y formatear fechas. Una vulnerabilidad de salto de ruta afecta a usuarios de npm (servidor) de Moment.js entre las versiones 1.0.1 y 2.29.1, especialmente si es usada directamente una cadena de configuración regional proporcionada por el usuario para cambiar la configuración regional de Moment. Este problema está parcheado en la versión 2.29.2, y el parche puede aplicarse a todas las versiones afectadas. Como medida de mitigación, sanee el nombre de la configuración regional proporcionada por el usuario antes de pasarlo a Moment.js","source":"nvd"}],"published":"2022-04-04T00:00:00.000Z","modified":"2026-09-10T03:49:28.830Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:N/I:P/A:N","score":5,"rating":"MEDIUM"}],"cwes":["CWE-22","CWE-27"],"affected":[{"ranges":[{"version":">= 1.0.1, < 2.29.2","status":"affected"}],"vendor":"moment","product":"moment","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.29.2"}],"ecosystem":"npm","package":"moment","purl":"pkg:npm/moment","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.29.2"}],"ecosystem":"NuGet","package":"Moment.js","purl":"pkg:nuget/Moment.js","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"1.0.1","fixed":"2.29.2"},{"status":"affected","introduced":"1.0.1","fixed":"2.29.2"}],"vendor":"momentjs","product":"moment","cpe":"cpe:2.3:a:momentjs:moment:*:*:*:*:*:node.js:*:*","source":"nvd"},{"ranges":[{"status":"affected","fixed":"5.21.0"}],"vendor":"tenable","product":"tenable.sc","cpe":"cpe:2.3:a:tenable:tenable.sc:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[],"vendor":"netapp","product":"active_iq","cpe":"cpe:2.3:a:netapp:active_iq:-:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"35"},{"status":"affected","version":"36"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"10.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/moment/moment/security/advisories/GHSA-8hfj-j24r-96c4","tags":["vendor-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/moment/moment/commit/4211bfc8f15746be4019bba557e29a7ba83d54c5","tags":["patch","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.tenable.com/security/tns-2022-09","tags":["patch","release-notes","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://security.netapp.com/advisory/ntap-20220513-0006/","tags":["third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6QIO6YNLTK2T7SPKDS4JEL45FANLNC2Q/","tags":["vendor-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ORJX2LF6KMPIHP6B2P6KZIVKMLE3LVJ5/","tags":["vendor-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2023/01/msg00035.html","tags":["mailing-list","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://security.netapp.com/advisory/ntap-20241108-0002/","tags":[],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24785","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/moment/moment","tags":["package"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6QIO6YNLTK2T7SPKDS4JEL45FANLNC2Q","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ORJX2LF6KMPIHP6B2P6KZIVKMLE3LVJ5","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6QIO6YNLTK2T7SPKDS4JEL45FANLNC2Q","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ORJX2LF6KMPIHP6B2P6KZIVKMLE3LVJ5","tags":["web"],"sources":["ghsa"]},{"url":"https://security.netapp.com/advisory/ntap-20220513-0006","tags":["web"],"sources":["ghsa"]},{"url":"https://security.netapp.com/advisory/ntap-20241108-0002","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2025-04-23T15:56:10.022Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-24785","url":"https://www.cve.org/CVERecord?id=CVE-2022-24785","licence":"CVE Terms of Use","modified":"2025-11-03T21:46:06.689Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-8hfj-j24r-96c4","url":"https://github.com/advisories/GHSA-8hfj-j24r-96c4","licence":"CC-BY-4.0","modified":"2026-09-10T03:49:28.830Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-24785","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-24785","licence":"Public domain","modified":"2026-06-17T04:32:30.850Z"}],"updatedAt":"2026-11-25T22:58:10.397Z","epss":{"score":0.05442,"percentile":0.92901,"date":"2026-12-01T12:00:22.000Z"}}