LiveActive security incident?Get immediate response
CVE Record

CVE-2022-31129: Inefficient Regular Expression Complexity in moment

moment is a JavaScript date library for parsing, validating, manipulating, and formatting dates. Affected versions of moment were found to use an inefficient parsing algorithm. Specifically using string-to-date parsing in moment (more specifically rfc2822 parsing, which is tried by default) has quadratic (N^2) complexity on specific inputs. Users may notice a noticeable slowdown is observed with inputs above 10k characters. Users who pass user-provided strings without sanity length checks to moment constructor are vulnerable to (Re)DoS attacks. The problem is patched in 2.29.4, the patch can be applied to all affected versions with minimal tweaking. Users are advised to upgrade. Users unable to upgrade should consider limiting date lengths accepted from user input.

HighCVSS 7.5Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

Moment.js can be slowed dramatically when it parses very long, specially shaped date strings. Systems that pass user-controlled text directly into Moment may let an unauthenticated attacker consume server resources and degrade availability. The issue is fixed in Moment 2.29.4.

Executive priority

Treat as a high-priority availability issue for internet-facing services that parse user-submitted dates. Remediation is straightforward when direct dependencies can be upgraded, but embedded or packaged copies require vendor tracking.

Technical view

CVE-2022-31129 is a CWE-400 resource-consumption flaw in Moment versions 2.18.0 through before 2.29.4. The default string-to-date path can try RFC2822 parsing with quadratic complexity on specific long inputs, creating a ReDoS-style availability risk. CVSS is 7.5.

Likely exposure

Exposure is most likely in JavaScript applications, APIs, or server-side rendering paths that use affected Moment versions and parse user-supplied date strings without length limits. Bundled downstream packages may also expose the vulnerable library.

Exploitation context

The source bundle does not show CISA KEV listing or confirmed active exploitation. The issue is remotely triggerable without authentication in vulnerable applications, but only where attacker-controlled strings reach Moment parsing without practical input limits.

Researcher notes

Focus validation on reachability, not just dependency presence. The vulnerable behavior requires long attacker-controlled strings reaching Moment's string parsing path. Avoid assuming product exposure solely from a bundled library without proving a user-controlled parsing path.

Mitigation direction

  • Upgrade Moment to 2.29.4 or later.
  • Apply downstream vendor security updates where Moment is packaged.
  • Limit accepted date input length before calling Moment.
  • Prefer strict, expected date formats for user input.
  • Monitor vendor advisories for products embedding Moment.

Validation and detection

  • Inventory application and transitive dependencies for Moment versions.
  • Check package lockfiles and deployed artifacts for versions below 2.29.4.
  • Trace user-controlled date fields into Moment parsing calls.
  • Confirm input validation rejects unusually long date strings.
  • Review downstream OS or appliance advisories if Moment is packaged there.
Prepared
Confidence
high
Sources
9

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 · low confidence lookup

CWE-400: 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
cve · low confidence lookup

CVE-2022-31129 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:N/A:H

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
12Source 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:N/A:H3.93.6Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

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

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

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>= 2.18.0, < 2.29.4Listed
Weakness

CWE details

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

CWE-400 · source CWE mapping

Uncontrolled Resource Consumption

Uncontrolled Resource Consumption represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.