Skip to main content
Public proof of conceptFix available

CVE-2022-31129

A public proof of concept exists; no exploitation attested.

  • Published2022-07-06
  • WeaknessCWE-1333 · CWE-400

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

Description

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.

Timeline

dates in UTC
  1. 2022-07-0618:15CVE publishedNVD

Versions per branch

NVD · OSV
Fedoraproject fedora
BranchAffectedFixed in
35.x= 35no fix published
36.x= 36no fix published
37.x= 37no fix published
Debian debian linux
BranchAffectedFixed in
10.0= 10.0no fix published
Momentjs moment
BranchAffectedFixed in
2.x≥ 2.18.0, < 2.29.42.29.4

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As GitHub_M, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • moment
    Affected
    • = >= 2.18.0, < 2.29.4no fix stated

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE terms of useCVE recordupdated 2023-01-31

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • @rootio/momentRoot:npmall versions · fixed in 2.24.0-root.io.1
  • @rootio/momentRoot:npmall versions · fixed in 2.24.0-root.io.2
  • @rootio/momentRoot:npmall versions · fixed in 2.24.0-root.io.3
  • @rootio/momentRoot:npmall versions · fixed in 2.26.0-root.io.1
  • @rootio/momentRoot:npmall versions · fixed in 2.26.0-root.io.2
  • @rootio/momentRoot:npmall versions · fixed in 2.27.0-root.io.1
  • @rootio/momentRoot:npmall versions · fixed in 2.27.0-root.io.2
  • @rootio/momentRoot:npmall versions · fixed in 2.29.3-root.io.1

142 more package ranges on OSV.dev

Vendor advisories

  • CVE-2022-31129 Red Hat Product Security154 products fixed · 115 known affected

    moment: inefficient parsing algorithm resulting in DoS

    servicemesh-grafana as a component of OpenShift Service Mesh 2.0 · servicemesh-grafana-prometheus as a component of OpenShift Service Mesh 2.0 · servicemesh-grafana.src as a component of OpenShift Service Mesh 2.0 · +112 more

  • RHSA-2026:100741 Red Hat Product Security112 products fixed

    Red Hat Security Advisory: Red Hat OpenShift Data Foundation 5.0.0 security, enhancement & bug fix update

  • RHSA-2023:3623 Red Hat Product Security159 products fixed

    Red Hat Security Advisory: Red Hat Ceph Storage 6.1 security and bug fix update

  • RHSA-2023:1486 Red Hat Product Security2 products fixed

    Red Hat Security Advisory: Red Hat Gluster Storage web-admin-build security update

  • RHSA-2023:1043 Red Hat Product Security3 products fixed

    Red Hat Security Advisory: Red Hat Single Sign-On 7.6.2 security update on RHEL 7

  • RHSA-2023:1049 Red Hat Product Security1 product fixed

    Red Hat Security Advisory: Red Hat Single Sign-On 7.6.2 security update

22 more advisories

Full record on NVD

Fix

  1. Vendor fix Red Hat Product Security RHSA-2026:100741 · 112 productsBefore applying this update, make sure all previously released errata relevant to your system have been applied. For details on how to apply this update, refer to: https://docs.redhat.com/en/documentation/red_hat_openshift_data_foundation/5.0/html/updating_openshift_data_foundation/updating-ocs-t…
  2. Vendor fix Red Hat Product Security RHSA-2023:3623 · 159 productsFor details on how to apply this update, see Upgrade a Red Hat Ceph Storage cluster using cephadm in the Red Hat Storage Ceph Upgrade Guide (https://access.redhat.com/documentation/en-us/red_hat_ceph_storage).
  3. Vendor fix Red Hat Product Security RHSA-2023:1486 · 2 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
  4. Vendor fix Red Hat Product Security RHSA-2023:1043 · 3 productsBefore applying this update, make sure all previously released errata relevant to your system have been applied. For details on how to apply this update, refer to: https://access.redhat.com/articles/11258
  5. Vendor fix Red Hat Product Security RHSA-2022:8652 · 1 productBefore applying the update, back up your existing installation, including all applications, configuration files, databases and database settings, and so on. Installation instructions are available from the Fuse 7.11.1 product documentation page: https://access.redhat.com/documentation/en-us/red_ha…
  6. Vendor fix Red Hat Product Security RHSA-2022:7313 · 192 productsFor Red Hat Advanced Cluster Management for Kubernetes, see the following documentation, which will be updated shortly for this release, for important instructions on installing this release: https://access.redhat.com/documentation/en-us/red_hat_advanced_cluster_management_for_kubernetes/2.6/html-…

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

  • CISA-ADPSSVC decisionpoc2025-04-22
  • CNACVSS 3.17.5known since 2026-10-23
  • NVDCVSS 3.17.5read 2026-10-23
  • NVDCVSS 2.05read 2026-10-23
  • CNAweakness (CWE)CWE-400known since 2026-10-23
  • NVDweakness (CWE)CWE-1333read 2026-10-23
  • FIRST EPSSEPSS score5.6 %2026-12-04
  • OSVaffected packages—
  • GitHub AdvisoriesadvisoryHigh2022-07-06

Identifiers

Technical details

CVSS v3 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Published
2022-07-06
Last modified
2025-11-03
NVD status
Modified
GitHub advisory
GHSA-wc69-rhjr-hc9g

Frequently asked questions

What is CVE-2022-31129?

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.

Is CVE-2022-31129 actively exploited?

A proof-of-concept exploit exists for CVE-2022-31129, but active exploitation has not been confirmed at this time.

What is the CVSS score for CVE-2022-31129?

CVE-2022-31129 has a CVSS v3 base score of 7.5 (High severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.

Running moment? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website checks · 250 API requests/month

Sources for this record