{"id":"CVE-2022-24785","published":"2022-04-04T00:00:00Z","modified":"2025-11-03T21:46:06Z","title":"Path Traversal in Moment.js","vendor":"moment","product":"moment","tier":"core","eol":null,"affectedVersions":[{"vendor":"moment","product":"moment","versions":[">= 1.0.1, < 2.29.2"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2025-04-23T15:56:10.022369Z","from":"CISA ADP","provenance":"source"},"description":{"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.","provenance":"source","from":"CVE.org"},"summary":{"text":"Moment.js, the JavaScript date library, contains a path traversal flaw affecting its npm (server-side) usage in versions 1.0.1 through 2.29.1, particularly where a user-provided locale string is passed directly to switch the moment locale. An attacker who can supply that locale string over the network, without authentication or user interaction, can traverse directories to reach files outside the intended locale path, with the impact on integrity.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T00:12:16Z"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0267,"percentile":0.86478,"date":"2026-11-25","provenance":"source"},"kev":null,"vulncheckKev":{"dateAdded":"2024-07-25","exploitedFirstSeen":"2024-07-25","ransomware":false,"evidence":[{"url":"https://www.cisa.gov/sites/default/files/2024-07/aa24-207a-dprk-cyber-group-conducts-global-espionage-campaign.pdf","date":"2024-07-25"}],"evidenceTotal":1,"provenance":"source"},"exploited":true,"otx":{"pulseCount":4,"pulses":[{"name":"NCSC and partners issue warning over North Korean state-sponsored cyber campaign to steal military and nuclear secrets","url":"https://otx.alienvault.com/pulse/66b1ebf1bb045b0a9ac380d8","created":"2024-08-06"},{"name":"Exposing Onyx Sleet: Indictments, TTPs, and Arsenal","url":"https://otx.alienvault.com/pulse/66aa334b7fc91f0b45a50743","created":"2024-07-31"},{"name":"Vulnerabilities in Red Hat Products","url":"https://otx.alienvault.com/pulse/62b97de82fd76c5da3a3a009","created":"2022-06-27"},{"name":"ACTUALIZACION | Red Hat Customer Portal - Access to 24x7 support and knowledge","url":"https://otx.alienvault.com/pulse/62a21574df118d0db8450abd","created":"2022-06-09"}],"provenance":"machine"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"},{"id":"CWE-27","name":"Path Traversal: 'dir/../../filename'"}],"references":[{"url":"https://github.com/moment/moment/security/advisories/GHSA-8hfj-j24r-96c4","tags":[]},{"url":"https://github.com/moment/moment/commit/4211bfc8f15746be4019bba557e29a7ba83d54c5","tags":[]},{"url":"https://www.tenable.com/security/tns-2022-09","tags":[]},{"url":"https://security.netapp.com/advisory/ntap-20220513-0006/","tags":[]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6QIO6YNLTK2T7SPKDS4JEL45FANLNC2Q/","tags":["vendor-advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ORJX2LF6KMPIHP6B2P6KZIVKMLE3LVJ5/","tags":["vendor-advisory"]},{"url":"https://lists.debian.org/debian-lts-announce/2023/01/msg00035.html","tags":["mailing-list"]},{"url":"https://security.netapp.com/advisory/ntap-20241108-0002/","tags":[]}],"techniques":[],"reports":[],"affected":[{"ecosystem":"npm","package":"moment","vulnerableRanges":["<2.29.2"],"patched":["2.29.2"],"from":["GHSA-8hfj-j24r-96c4"],"provenance":"source"},{"ecosystem":"NuGet","package":"Moment.js","vulnerableRanges":["<2.29.2"],"patched":["2.29.2"],"from":["GHSA-8hfj-j24r-96c4"],"provenance":"source"}],"advisories":[{"id":"GHSA-8hfj-j24r-96c4","url":"https://github.com/advisories/GHSA-8hfj-j24r-96c4","severity":"HIGH","ecosystem":"npm","package":"moment","vulnerableRanges":["<2.29.2"],"patched":["2.29.2"],"provenance":"source","from":"GHSA"},{"id":"GHSA-8hfj-j24r-96c4","url":"https://github.com/advisories/GHSA-8hfj-j24r-96c4","severity":"HIGH","ecosystem":"NuGet","package":"Moment.js","vulnerableRanges":["<2.29.2"],"patched":["2.29.2"],"provenance":"source","from":"GHSA"}],"euvd":{"id":"EUVD-2022-1677","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2022-1677","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[],"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2023-05-29","earliestUrl":"https://github.com/AnomalousVectors/cve-2022-24785-poc-lab","repos":[{"name":"AnomalousVectors/cve-2022-24785-poc-lab","url":"https://github.com/AnomalousVectors/cve-2022-24785-poc-lab","stars":1,"created":"2023-05-29"}]},"first":{"date":"2023-05-29","source":"PoC-in-GitHub","url":"https://github.com/AnomalousVectors/cve-2022-24785-poc-lab"},"provenance":"source"},"exploitRefs":[],"flow":[],"timeline":[{"date":"2022-04-04","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2022-24785","provenance":"source"},{"date":"2023-05-29","kind":"exploit-public","label":"First public exploit: PoC-in-GitHub","url":"https://github.com/AnomalousVectors/cve-2022-24785-poc-lab","provenance":"source"},{"date":"2024-07-25","kind":"exploited-reported","label":"Exploitation first reported (VulnCheck KEV evidence)","url":"https://www.cisa.gov/sites/default/files/2024-07/aa24-207a-dprk-cyber-group-conducts-global-espionage-campaign.pdf","provenance":"source"}],"speed":{"daysToPublicExploit":420,"firstExploitFrom":"PoC-in-GitHub","daysToKev":null},"priority":{"score":64.1,"factors":[{"name":"In a KEV catalog","points":35.0,"detail":"listed in VulnCheck KEV"},{"name":"Recent KEV listing","points":0.0,"detail":"added 853 days ago"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":17.3,"detail":"percentile 0.8648"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"1 PoC-in-GitHub repo"},{"name":"Mentioned in OTX pulses","points":1.59,"detail":"4 pulses"},{"name":"CVSS severity","points":5.25,"detail":"base score 7.5"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]},"lineage":{"familyId":"fam-moment-cve-2022-24785","children":[{"from":"CVE-2022-24785","to":"CVE-2026-17495","relation":"incomplete-fix","confidence":"high","kind":"lineage","evidence":[{"kind":"text","provenance":"source","relation":"incomplete-fix","quote":"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().","from":"CVE.org","in":"CVE-2026-17495"},{"kind":"similar","provenance":"machine","score":0.71,"basis":"same product + CWE + description similarity"}]}],"packageHistory":[{"cve":"CVE-2016-4055","published":"2017-01-23","fixed":"2.11.2","kev":false},{"cve":"CVE-2017-18214","published":"2018-03-04","fixed":"2.19.3","kev":false},{"cve":"CVE-2022-24785","published":"2022-04-04","fixed":"2.29.2","kev":false},{"cve":"CVE-2022-31129","published":"2022-07-06","fixed":"2.29.4","kev":false,"link":{"from":"CVE-2022-24785","to":"CVE-2022-31129","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:moment","fromFixed":"2.29.2","toFixed":"2.29.4","daysApart":93},{"kind":"version-step","provenance":"source","package":"NuGet:Moment.js","fromFixed":"2.29.2","toFixed":"2.29.4","daysApart":93}]}},{"cve":"CVE-2026-17495","published":"2026-09-15","fixed":"2.31.0","kev":false}],"package":"npm:moment"}}