{"cve":"CVE-2022-31129","nvd":{"published":"2022-07-06T18:15:19.570","modified":"2026-06-17T04:44:51.930","status":"Modified","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5},"cwes":["CWE-1333","CWE-400"],"references":["https://github.com/moment/moment/commit/9a3b5894f3d5d602948ac8a02e4ee528a49ca3a3","https://github.com/moment/moment/pull/6015#issuecomment-1152961973","https://github.com/moment/moment/security/advisories/GHSA-wc69-rhjr-hc9g","https://huntr.dev/bounties/f0952b67-f2ff-44a9-a9cd-99e0a87cb633/","https://lists.debian.org/debian-lts-announce/2023/01/msg00035.html"],"products":["debian:debian_linux","fedoraproject:fedora","momentjs:moment"],"source":"nvd","synced_at":"2026-10-19T21:33:44.859608815+00:00"},"epss":{"cve":"CVE-2022-31129","score":0.05551,"percentile":0.92844,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-wc69-rhjr-hc9g","url":"https://osv.dev/vulnerability/GHSA-wc69-rhjr-hc9g","summary":"Moment.js vulnerable to Inefficient Regular Expression Complexity","modified":"2026-09-10T03:49:45.131249858Z","packages":[{"ecosystem":"npm","name":"moment","purl":"pkg:npm/moment","ranges":[">=2.18.0 <2.29.4"],"fixed":["2.29.4"]},{"ecosystem":"NuGet","name":"Moment.js","purl":"pkg:nuget/Moment.js","ranges":[">=2.18.0 <2.29.4"],"fixed":["2.29.4"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}