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.
CVE-2022-31129
This high-severity CVE scores 7.5 under NVD CVSS v3. EPSS exploit probability: 3.4%, top 12% of all CVEs by exploit prediction. GitHub Security Advisory data not yet ingested — confidence will rise once GHSA publishes (typical lag: hours to days for open-source ecosystem CVEs; never for infrastructure-only CVEs).
- High severity, but no confirmed exploitation yet
A fix is available — apply it.
- CVSS v3
- 7.5
- EG Score
- 7.5(medium)
- EPSS
- 91.1%
- KEV
- Not listed
Published
July 6, 2022
Last Modified
November 3, 2025
References (21)
- security-advisories@githubhttps://github.com/moment/moment/commit/9a3b5894f3d5d602948ac8a02e4ee528a49ca3a3
- security-advisories@githubhttps://github.com/moment/moment/pull/6015#issuecomment-1152961973
- security-advisories@githubhttps://github.com/moment/moment/security/advisories/GHSA-wc69-rhjr-hc9g
- security-advisories@githubhttps://huntr.dev/bounties/f0952b67-f2ff-44a9-a9cd-99e0a87cb633/
- security-advisories@githubhttps://lists.debian.org/debian-lts-announce/2023/01/msg00035.html
- security-advisories@githubhttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6QIO6YNLTK2T7SPKDS4JEL45FANLNC2Q/
- security-advisories@githubhttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IWY24RJA3SBJGA5N4CU4VBPHJPPPJL5O/
- security-advisories@githubhttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ORJX2LF6KMPIHP6B2P6KZIVKMLE3LVJ5/
- security-advisories@githubhttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZMX5YHELQVCGKKQVFXIYOTBMN23YYSRO/
- security-advisories@githubhttps://security.netapp.com/advisory/ntap-20221014-0003/
- af854a3a-2127-422b-91ae-364da2661108https://github.com/moment/moment/commit/9a3b5894f3d5d602948ac8a02e4ee528a49ca3a3
- af854a3a-2127-422b-91ae-364da2661108https://github.com/moment/moment/pull/6015#issuecomment-1152961973
- af854a3a-2127-422b-91ae-364da2661108https://github.com/moment/moment/security/advisories/GHSA-wc69-rhjr-hc9g
- af854a3a-2127-422b-91ae-364da2661108https://huntr.dev/bounties/f0952b67-f2ff-44a9-a9cd-99e0a87cb633/
- af854a3a-2127-422b-91ae-364da2661108https://lists.debian.org/debian-lts-announce/2023/01/msg00035.html
Vendor Advisories for CVE-2022-31129(17)
These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.
- RHSA-2023:1486Red Hat Product SecurityHigh
Red Hat Security Advisory: Red Hat Gluster Storage web-admin-build security update
- RHSA-2023:1043Red Hat Product SecurityHigh
Red Hat Security Advisory: Red Hat Single Sign-On 7.6.2 security update on RHEL 7
- RHSA-2023:1049Red Hat Product SecurityHigh
Red Hat Security Advisory: Red Hat Single Sign-On 7.6.2 security update
- RHSA-2023:1047Red Hat Product SecurityHigh
Red Hat Security Advisory: Red Hat Single Sign-On 7.6.2 for OpenShift image security and enhancement update
- RHSA-2023:1045Red Hat Product SecurityHigh
Red Hat Security Advisory: Red Hat Single Sign-On 7.6.2 security update on RHEL 9
- RHSA-2023:1044Red Hat Product SecurityHigh
Red Hat Security Advisory: Red Hat Single Sign-On 7.6.2 security update on RHEL 8
- RHSA-2022:7313Red Hat Product SecurityMedium
Red Hat Security Advisory: Red Hat Advanced Cluster Management 2.6.2 security update and bug fixes
- RHSA-2022:7276Red Hat Product SecurityMedium
Red Hat Security Advisory: Red Hat Advanced Cluster Management 2.4.8 security fixes and container updates
- +9 more
Patch Availability(18)
Patches are aggregated from vendor advisories (Red Hat, Microsoft, Cisco, GitHub) and package ecosystems (OSV, GHSA). Multiple rows for the same upstream release have been deduplicated.
Weakness Classification(2)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
Additional Vendor Advisories
(10)
Vendors that published advisories for this CVE beyond the curated set above. Broader coverage but minimal per-row detail — click through for the original advisory.
- Red HatRHSA-2022:5913IMPORTANT2022-07-06
RHSA-2022:5913 — Important
- Red HatRHSA-2022:5914IMPORTANT2022-07-06
RHSA-2022:5914 — Important
- Red HatRHSA-2022:5915IMPORTANT2022-07-06
RHSA-2022:5915 — Important
- Red HatRHSA-2022:6271IMPORTANT2022-07-06
RHSA-2022:6271 — Important
- Red HatRHSA-2022:6272IMPORTANT2022-07-06
RHSA-2022:6272 — Important
- Red HatRHSA-2022:6392IMPORTANT2022-07-06
RHSA-2022:6392 — Important
- Red HatRHSA-2022:8652IMPORTANT2022-07-06
RHSA-2022:8652 — Important
- Red HatRHSA-2023:3623IMPORTANT2022-07-06
RHSA-2023:3623 — Important
- UbuntuUSN-5559-1MEDIUM
Moment.js vulnerabilities
- UbuntuUSN-6550-1MEDIUM
PostfixAdmin vulnerabilities
Frequently asked(5)
What is CVE-2022-31129?
When was CVE-2022-31129 disclosed?
Is CVE-2022-31129 actively exploited?
What is the CVSS score of CVE-2022-31129?
How do I remediate CVE-2022-31129?
Dependency Blast Radius
Explore the affected products and dependency analysis for CVE-2022-31129
Is Your Infrastructure Affected by CVE-2022-31129?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.