CVE-2022-24785
Path Traversal in Moment.js
7.5CVSSHIGH
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.
CVSS Vector Breakdown
Exploitability
AV:NAttack VectorNetwork
AC:LAttack ComplexityLow
PR:NPrivileges RequiredNone
UI:NUser InteractionNone
Scope
S:UScopeUnchanged
Impact
C:NConfidentialityNone
I:HIntegrityHigh
A:NAvailabilityNone
Weaknesses
Affected Products
and 5 more affected products View all →
Attack Graph
Products CVE Techniques Tactics
Click technique nodes to view MITRE ATT&CK details. Scroll to zoom, drag to pan.
Exploitability
Official Patch Available
MITRE ATT&CK
2 techniques Collection
Discovery
References
https://github.com/moment/moment/commit/4211bfc8f15746be4019bba557e29a7ba83d54c5
github.com
https://github.com/moment/moment/security/advisories/GHSA-8hfj-j24r-96c4
github.com
https://lists.debian.org/debian-lts-announce/2023/01/msg00035.html
lists.debian.org
and 14 more references View all →
Timeline
Published
Apr 4, 2022
Last Updated
Nov 3, 2025
Unlock Complete Vulnerability Intelligence
Get the full picture for CVE-2022-24785 and every CVE in our database. Create a free account — no credit card required.
Create Free AccountPlain-language analysis
Impact assessment and exploitation scenario in plain English
Attack graph visualization
Interactive attack path and kill chain mapping
Exploit details & PoC links
ExploitDB, Metasploit, GitHub PoCs with direct links
Nuclei scanner templates
Ready-to-use vulnerability scanner templates
Full remediation guide
Patch instructions, workarounds, and compliance impact
Interactive AI chat
Ask questions about this vulnerability in natural language
Related vulnerabilities
Semantically similar CVEs and attack patterns
REST API & MCP access
Integrate vulnerability data into your workflows