CVE-2022-24785
Path Traversal in Moment.js
Reported by github_m · Published April 4, 2022
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.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| moment | moment | >= 1.0.1, < 2.29.2 |
| moment | moment | 1.0.1 |
| chainguard | wazuh-dashboard | 0 |
| momentjs | moment | |
| chainguard | wazuh-dashboard-fips | 0 |
| npm | moment | 0 |
| NuGet | Moment.js | 0 |
Timeline
- Apr 4, 2022 CVE Published
- Apr 5, 2022 EPSS Score (30 in total, the first dated here)
- May 29, 2023 VulnCheck XDB Entry
- Feb 8, 2024 PoC Published
- Jul 25, 2024 VulnCheck KEV Exploitation
- Mar 9, 2026 Security Advisory (46 in total, the first dated here)
- Jul 2, 2026 Coalition ESS Score
- Nov 22, 2026 Distribution Patch (44 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2022-24785
vulnetix vdb fixes CVE-2022-24785
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-24785/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- FEDORA-2022-85aa8e5706 vendor-advisory
- FEDORA-2022-35b698150c vendor-advisory
- [debian-lts-announce] 20230130 [SECURITY] [DLA 3295-1] node-moment security update mailing-list
- https://nvd.nist.gov/vuln/detail/CVE-2022-24785 advisory
- https://github.com/advisories/GHSA-8hfj-j24r-96c4 advisory
- https://github.com/moment/moment url
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6QIO6YNLTK2T7SPKDS4JEL45FANLNC2Q url
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ORJX2LF6KMPIHP6B2P6KZIVKMLE3LVJ5 url
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6QIO6YNLTK2T7SPKDS4JEL45FANLNC2Q url
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ORJX2LF6KMPIHP6B2P6KZIVKMLE3LVJ5 url
- https://security.netapp.com/advisory/ntap-20220513-0006 advisory
- https://security.netapp.com/advisory/ntap-20241108-0002 advisory
- https://security.netapp.com/advisory/ntap-20241108-0002/ url