High severity7.5NVD Advisory· Published Apr 4, 2022· Updated Jun 17, 2026
CVE-2022-24785
CVE-2022-24785
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
momentnpm | < 2.29.2 | 2.29.2 |
Moment.jsNuGet | < 2.29.2 | 2.29.2 |
Affected products
5- osv-coords4 versionspkg:apk/chainguard/wazuh-dashboard-security-pluginpkg:apk/chainguard/wazuh-dashboard-security-plugin-fipspkg:npm/momentpkg:nuget/moment.js
< 4.14.6-r5+ 3 more
- (no CPE)range: < 4.14.6-r5
- (no CPE)range: < 4.14.6-r2
- (no CPE)range: < 2.29.2
- (no CPE)range: < 2.29.2
- moment/momentv5Range: >= 1.0.1, < 2.29.2
Patches
Vulnerability mechanics
References
16- github.com/moment/moment/commit/4211bfc8f15746be4019bba557e29a7ba83d54c5nvdPatchWEB
- www.tenable.com/security/tns-2022-09nvdPatchRelease NotesThird Party AdvisoryWEB
- github.com/advisories/GHSA-8hfj-j24r-96c4ghsaADVISORY
- github.com/moment/moment/security/advisories/GHSA-8hfj-j24r-96c4nvdVendor AdvisoryWEB
- lists.debian.org/debian-lts-announce/2023/01/msg00035.htmlnvdMailing ListThird Party AdvisoryWEB
- nvd.nist.gov/vuln/detail/CVE-2022-24785ghsaADVISORY
- security.netapp.com/advisory/ntap-20220513-0006/nvdThird Party Advisory
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6QIO6YNLTK2T7SPKDS4JEL45FANLNC2QghsaWEB
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ORJX2LF6KMPIHP6B2P6KZIVKMLE3LVJ5ghsaWEB
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6QIO6YNLTK2T7SPKDS4JEL45FANLNC2QghsaWEB
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ORJX2LF6KMPIHP6B2P6KZIVKMLE3LVJ5ghsaWEB
- security.netapp.com/advisory/ntap-20220513-0006ghsaWEB
- security.netapp.com/advisory/ntap-20241108-0002ghsaWEB
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6QIO6YNLTK2T7SPKDS4JEL45FANLNC2Q/nvd
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ORJX2LF6KMPIHP6B2P6KZIVKMLE3LVJ5/nvd
- security.netapp.com/advisory/ntap-20241108-0002/nvd
News mentions
0No linked articles in our index yet.