CVE-2022-31129Inefficient Regular Expression Complexity in moment
- 7.5HighCVSS base score
- 5.6%Exploitation in 30 daysEPSS · top 7.0% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- YesPublic exploitsa reference or SSVC says so
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.
Public exploit
An exploit or proof of concept is public: anyone can try it against an unpatched system. CISA's SSVC rates its exploitation: a proof of concept is public.
Timeline
ID reserved
By GitHub_M
- 49 days later
· 49 days later
Published
- 3 years later
· 3 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | High7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVDNVD · Modified | 3.1 | High7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
- EPSS (exploitation in 30 days)
- 5.6% · top 7.0% of all CVEs (13 Nov 2026)
- CISA SSVC
- Exploitation: poc · Automatable: yes · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 7.5.
Affected products
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- NuGetMoment.jsGHSA-wc69-rhjr-hc9g (opens in a new tab)
- npmmomentGHSA-wc69-rhjr-hc9g (opens in a new tab)
References
References11
- https://github.com/moment/moment/security/advisories/GHSA-wc69-rhjr-hc9g (opens in a new tab)x_transferred
- https://github.com/moment/moment/pull/6015#issuecomment-1152961973 (opens in a new tab)x_transferred
- https://github.com/moment/moment/commit/9a3b5894f3d5d602948ac8a02e4ee528a49ca3a3 (opens in a new tab)x_transferred
- https://huntr.dev/bounties/f0952b67-f2ff-44a9-a9cd-99e0a87cb633/ (opens in a new tab)x_transferred
- FEDORA-2022-85aa8e5706 (opens in a new tab)vendor-advisoryx_transferred
- FEDORA-2022-35b698150c (opens in a new tab)vendor-advisoryx_transferred
- FEDORA-2022-b9ef7c3c3c (opens in a new tab)vendor-advisoryx_transferred
- FEDORA-2022-798fd95813 (opens in a new tab)vendor-advisoryx_transferred
- https://security.netapp.com/advisory/ntap-20221014-0003/ (opens in a new tab)x_transferred
- [debian-lts-announce] 20230130 [SECURITY] [DLA 3295-1] node-moment security update (opens in a new tab)mailing-listx_transferred
- https://security.netapp.com/advisory/ntap-20241108-0002/ (opens in a new tab)
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2022-6433 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-wc69-rhjr-hc9g (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2022-31129)Record last updated .