# CVE-2022-24785: Path Traversal in Moment.js

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 5.44%, higher than 92% of CVEs (2026-12-01)
- Published: 2022-04-04T00:00:00.000Z
- Modified: 2026-09-10T03:49:28.830Z
- Also known as: GHSA-8hfj-j24r-96c4
- Weaknesses: CWE-22, CWE-27
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- moment moment: >= 1.0.1, < 2.29.2
- moment (npm): before 2.29.2
- Moment.js (NuGet): before 2.29.2
- momentjs moment: from 1.0.1 before 2.29.2
- tenable tenable.sc: before 5.21.0
- netapp active_iq: no versions given
- fedoraproject fedora: 35; 36
- debian debian_linux: 10.0

## Every score

- GitHub_M: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:P/A:N`

## References

- <https://github.com/moment/moment/security/advisories/GHSA-8hfj-j24r-96c4> (vendor-advisory, web)
- <https://github.com/moment/moment/commit/4211bfc8f15746be4019bba557e29a7ba83d54c5> (patch, web)
- <https://www.tenable.com/security/tns-2022-09> (patch, release-notes, third-party-advisory, web)
- <https://security.netapp.com/advisory/ntap-20220513-0006/> (third-party-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6QIO6YNLTK2T7SPKDS4JEL45FANLNC2Q/> (vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ORJX2LF6KMPIHP6B2P6KZIVKMLE3LVJ5/> (vendor-advisory)
- <https://lists.debian.org/debian-lts-announce/2023/01/msg00035.html> (mailing-list, third-party-advisory, web)
- <https://security.netapp.com/advisory/ntap-20241108-0002/>
- <https://nvd.nist.gov/vuln/detail/CVE-2022-24785> (advisory)
- <https://github.com/moment/moment> (package)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6QIO6YNLTK2T7SPKDS4JEL45FANLNC2Q> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ORJX2LF6KMPIHP6B2P6KZIVKMLE3LVJ5> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6QIO6YNLTK2T7SPKDS4JEL45FANLNC2Q> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ORJX2LF6KMPIHP6B2P6KZIVKMLE3LVJ5> (web)
- <https://security.netapp.com/advisory/ntap-20220513-0006> (web)
- <https://security.netapp.com/advisory/ntap-20241108-0002> (web)

## Sources

- CVE List: [CVE-2022-24785](https://www.cve.org/CVERecord?id=CVE-2022-24785), CVE Terms of Use, modified 2025-11-03
- GitHub Advisory Database: [GHSA-8hfj-j24r-96c4](https://github.com/advisories/GHSA-8hfj-j24r-96c4), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2022-24785](https://nvd.nist.gov/vuln/detail/CVE-2022-24785), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-24785 · Whole record: https://cve.day/CVE-2022-24785.json · Rebuilt by cve.day 2026-11-25T22:58:10.397Z
