CVE-2022-31129 — Vulnerability in moment — CVE Details
Moment.js vulnerable to Inefficient Regular Expression Complexity
Summary
Advisory Timeline
- First published July 6, 2022 (1559 days ago).
- Last revised September 10, 2026 — 1526 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
npm install moment@2.29.4
dotnet add package Moment.js --version 2.29.4
After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.
Affected Packages (2)
Affects 2 ecosystems: npm (1), nuget (1).
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-1333
- CWE-400Uncontrolled Resource ConsumptionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 7.5 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
References
- https://github.com/moment/moment/security/advisories/GHSA-wc69-rhjr-hc9gWEB
- https://nvd.nist.gov/vuln/detail/CVE-2022-31129ADVISORY
- https://github.com/moment/moment/pull/6015#issuecomment-1152961973WEB
- https://github.com/moment/moment/pull/6015/commits/4bbb9f3ccbe231de40207503f344fe5ce97584f4WEB
- https://github.com/moment/moment/pull/6015/commits/bfd4f2375d5c1a2106246721d693a9611dddfbfeWEB
- https://github.com/moment/moment/pull/6015/commits/dc0d180e90d8a84f7ff13572363330a22b3ea504WEB
- https://github.com/moment/moment/commit/9a3b5894f3d5d602948ac8a02e4ee528a49ca3a3WEB
- https://security.netapp.com/advisory/ntap-20241108-0002WEB
- https://security.netapp.com/advisory/ntap-20221014-0003WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZMX5YHELQVCGKKQVFXIYOTBMN23YYSROWEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ORJX2LF6KMPIHP6B2P6KZIVKMLE3LVJ5WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IWY24RJA3SBJGA5N4CU4VBPHJPPPJL5OWEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6QIO6YNLTK2T7SPKDS4JEL45FANLNC2QWEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZMX5YHELQVCGKKQVFXIYOTBMN23YYSROWEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ORJX2LF6KMPIHP6B2P6KZIVKMLE3LVJ5WEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IWY24RJA3SBJGA5N4CU4VBPHJPPPJL5OWEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6QIO6YNLTK2T7SPKDS4JEL45FANLNC2QWEB
- https://lists.debian.org/debian-lts-announce/2023/01/msg00035.htmlWEB
- https://huntr.dev/bounties/f0952b67-f2ff-44a9-a9cd-99e0a87cb633WEB
- https://github.com/moment/momentPACKAGE
Frequently Asked Questions
- What is CVE-2022-31129?
- Moment.js vulnerable to Inefficient Regular Expression Complexity This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.5/10).
- How do I check if my project is affected by CVE-2022-31129?
- CVE-2022-31129 affects moment and Moment.js. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2022-31129 and 200,000+ other known vulnerabilities.
Severity & Exploitability
High exploitability or significant impact. Prioritize remediation within days.
Also Known As
Related CVEs
- CVE-2022-24785HIGH
Path Traversal: 'dir/../../filename' in moment.locale
- CVE-2026-107375HIGH
JHipster: SQL Injection in the Parameter of JHipster-Generated Reactive (WebFlux + R2DBC) Applicationssort
- CVE-2026-107384HIGH
MariaDB Connector/Node.js: SQL injection through object keys in SET expansion (permitSetMultiParamEntries)
Check if you're affected
Scan your dependencies to see if this vulnerability affects your projects.
Scan Your Dependencies