LiveActive security incident?Get immediate response
CVE Record

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

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.

HighCVSS 7.5Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

Moment.js could load a locale using an unsafe path when server-side applications pass user-controlled locale names directly to Moment. In affected versions, that can let an attacker influence file resolution outside intended locale files. The CVSS impact is high for integrity, but the provided sources do not show active exploitation.

Executive priority

Treat this as a high-priority dependency remediation for internet-facing or multi-tenant Node.js services that accept locale preferences. It is less urgent where Moment is absent, patched, or never receives user-controlled locale input.

Technical view

CVE-2022-24785 is CWE-22/CWE-27 path traversal in moment npm versions >=1.0.1 and <2.29.2. The risky pattern is server-side locale switching with unsanitized user input. Moment 2.29.2 patches the issue, and the advisory says the patch can be applied to affected versions.

Likely exposure

Exposure is most likely in Node.js server applications using moment before 2.29.2 and accepting locale values from HTTP parameters, headers, profiles, or tenant settings. The provided description especially calls out npm server users; it does not identify client-only browser use as the primary affected scenario.

Exploitation context

The bundle marks KEV false and provides no cited evidence of active exploitation. Practical risk depends on whether an application exposes user-controlled locale selection into Moment on the server.

Researcher notes

Focus validation on data flow, not only package version. The vulnerable condition needs affected moment versions plus unsanitized user-controlled locale selection. The sources provide patch and workaround direction but no exploit-in-the-wild evidence.

Mitigation direction

  • Upgrade moment to version 2.29.2 or later.
  • Backport the referenced patch if immediate upgrade is not feasible.
  • Sanitize user-provided locale names before passing them to Moment.js.
  • Review vendor advisories for packaged or embedded moment dependencies.

Validation and detection

  • Inventory direct and transitive moment versions in server-side JavaScript applications.
  • Search code paths where request-controlled locale values reach Moment.js.
  • Confirm production packages resolve moment to 2.29.2 or later.
  • Check appliance and Linux distribution advisories for embedded node-moment packages.
Prepared
Confidence
high
Sources
8

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-22: File access and web shell behavior lookup

File traversal and upload weaknesses can lead teams to review file, web shell, execution, and collection telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cwe · low confidence lookup

CWE-27: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

File access behavior lookup

The CVE wording references file access or upload behavior, so file telemetry and web shell review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2022-24785 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
7.5 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
9Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
7.5CVSS 3.1HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N3.93.6Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

7.5High
CVSS 3.1 vector shape for CVE-2022-24785Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
momentmoment>= 1.0.1, < 2.29.2Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-22 · source CWE mapping

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.

CWE-27 · source CWE mapping

Path Traversal: 'dir/../../filename'

Path Traversal: 'dir/../../filename' represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.