CVE-2022-31129
CVE-2022-31129 · Inefficient Regular Expression Complexity in moment
This page contains facts from public vulnerability sources. Check the original advisory before updating.
This page shows selected source facts. See the linked advisories for the complete description and affected versions.
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 7.5 · High · EPSS 5.6% · Fix available
- Published
- Updated
Affected products and versions
moment
- Versions
- >= 2.18.0, < 2.29.4: Affected
No fix published
node-moment Debian:12
- Affected ranges
- ECOSYSTEM: < 2.29.4+ds-1
Update to 2.29.4+ds-1
node-moment Debian:13
- Affected ranges
- ECOSYSTEM: < 2.29.4+ds-1
Update to 2.29.4+ds-1
node-moment Debian:14
- Affected ranges
- ECOSYSTEM: < 2.29.4+ds-1
Update to 2.29.4+ds-1
moment npm
- Affected ranges
- SEMVER: ≥ 2.18.0, < 2.29.4
Update to 2.29.4
moment.js NuGet
- Versions
- 2.18.0
- 2.18.1
- 2.18.2
- 2.19.0
- 2.19.1
- 2.19.2
- 2.19.3
- 2.19.4
- 2.20.0
- 2.20.1
- 2.21.0
- 2.22.0
- 2.22.1
- 2.22.2
- 2.23.0
- 2.24.0
- 2.25.0
- 2.25.1
- 2.25.2
- 2.26.0
- 2.27.0
- 2.28.0
- 2.29.0
- 2.29.1
- 2.29.2
- 2.29.3
- Affected ranges
- ECOSYSTEM: ≥ 2.18.0, < 2.29.4
Update to 2.29.4
gnucash Ubuntu:16.04:LTS
- Versions
- 1:2.6.6-2ubuntu2
- 1:2.6.9-1ubuntu1
- 1:2.6.12-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
node-moment Ubuntu:Pro:16.04:LTS
- Versions
- 2.10.6+dfsg-1
- 2.11.0+ds-1
- 2.11.0+ds-1ubuntu0.1~esm1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
ntopng Ubuntu:Pro:16.04:LTS
- Versions
- 1.2.1+dfsg1-2ubuntu1
- 2.0+dfsg1-1
- 2.2+dfsg1-1
- 2.2+dfsg1-1build1
- 2.2+dfsg1-1ubuntu0.1~esm2
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
sabnzbdplus Ubuntu:16.04:LTS
- Versions
- 0.7.20-1
- 0.7.20+dfsg-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
wordpress Ubuntu:16.04:LTS
- Versions
- 4.3+dfsg-1
- 4.3.1+dfsg-1
- 4.4+dfsg-1
- 4.4.1+dfsg-1
- 4.4.2+dfsg-1
- 4.4.2+dfsg-1ubuntu1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
node-moment Ubuntu:18.04:LTS
- Versions
- 2.18.1+ds-1
- 2.19.1+ds-1
- 2.19.2+ds-1
- 2.19.3+ds-1
- 2.19.4+ds-1
- 2.20.1+ds-1
- Affected ranges
- ECOSYSTEM: < 2.20.1+ds-1ubuntu0.1
Update to 2.20.1+ds-1ubuntu0.1
gnucash Ubuntu:18.04:LTS
- Versions
- 1:2.6.17-1ubuntu1
- 1:2.6.18-1
- 1:2.6.19-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
mediawiki Ubuntu:18.04:LTS
- Versions
- 1:1.27.3-1
- 1:1.27.4-1
- 1:1.27.4-2
- 1:1.27.4-3
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
ntopng Ubuntu:Pro:18.04:LTS
- Versions
- 2.4+dfsg1-3
- 2.4+dfsg1-4
- 3.2+dfsg1-1
- 3.2+dfsg1-1ubuntu0.1~esm2
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
sabnzbdplus Ubuntu:18.04:LTS
- Versions
- 1.1.1+dfsg-1
- 2.3.1+dfsg-1
- 2.3.2+dfsg-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
syncthing Ubuntu:18.04:LTS
- Versions
- 0.14.36+ds1-1
- 0.14.38+ds1-1
- 0.14.43+ds1-5
- 0.14.43+ds1-6
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
wordpress Ubuntu:18.04:LTS
- Versions
- 4.8.2+dfsg-2
- 4.8.3+dfsg-1
- 4.9.1+dfsg-1
- 4.9.2+dfsg-1
- 4.9.4+dfsg-1
- 4.9.5+dfsg1-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
node-moment Ubuntu:20.04:LTS
- Versions
- 2.24.0+ds-1
- 2.24.0+ds-2
- Affected ranges
- ECOSYSTEM: < 2.24.0+ds-2ubuntu0.1
Update to 2.24.0+ds-2ubuntu0.1
gnucash Ubuntu:20.04:LTS
- Versions
- 1:3.7-1ubuntu1
- 1:3.7-1ubuntu2
- 1:3.7-2ubuntu1
- 1:3.8b-1
- 1:3.8b-1build2
- 1:3.8b-1build3
- 1:3.8b-1build4
- 1:3.8b-1ubuntu1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
mediawiki Ubuntu:Pro:20.04:LTS
- Versions
- 1:1.31.2-1ubuntu1
- 1:1.31.5-1
- 1:1.31.5-1ubuntu1
- 1:1.31.5-2
- 1:1.31.5-3
- 1:1.31.5-3ubuntu1
- 1:1.31.6-1
- 1:1.31.7-1
- 1:1.31.7-1ubuntu0.1~esm1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
ntopng Ubuntu:20.04:LTS
- Versions
- 3.8+dfsg1-2.1build3
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
omnidb Ubuntu:20.04:LTS
- Versions
- 2.16.0+ds-2
- 2.16.0+ds-2build1
- 2.16.0+ds-3
- 2.16.0+ds-4
- 2.16.0+ds-4build1
- 2.17.0+ds-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
ruby-momentjs-rails Ubuntu:20.04:LTS
- Versions
- 2.20.1-2
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
Original sources
- https://github.com/moment/moment/security/advisories/GHSA-wc69-rhjr-hc9g
- https://github.com/moment/moment/pull/6015#issuecomment-1152961973
- https://github.com/moment/moment/commit/9a3b5894f3d5d602948ac8a02e4ee528a49ca3a3
- https://huntr.dev/bounties/f0952b67-f2ff-44a9-a9cd-99e0a87cb633/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6QIO6YNLTK2T7SPKDS4JEL45FANLNC2Q/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ORJX2LF6KMPIHP6B2P6KZIVKMLE3LVJ5/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IWY24RJA3SBJGA5N4CU4VBPHJPPPJL5O/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZMX5YHELQVCGKKQVFXIYOTBMN23YYSRO/
- https://security.netapp.com/advisory/ntap-20221014-0003/
- https://lists.debian.org/debian-lts-announce/2023/01/msg00035.html
- https://security.netapp.com/advisory/ntap-20241108-0002/
- https://nvd.nist.gov/vuln/detail/CVE-2022-31129