CVE-2022-31129Inefficient Regular Expression Complexity in moment
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.
What to do
Fixed builds are available from Debian, Ubuntu, npm: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | gnucash | Fix pending | UBUNTU-CVE-2022-31129 | |
| Ubuntu 26.10 | mediawiki | Fix pending | UBUNTU-CVE-2022-31129 | |
| Ubuntu 26.10 | odoo | Fix pending | UBUNTU-CVE-2022-31129 | |
| Ubuntu 26.10 | postfixadmin | Fix pending | UBUNTU-CVE-2022-31129 | |
| Ubuntu 26.10 | sabnzbdplus | Fix pending | UBUNTU-CVE-2022-31129 | |
| Ubuntu 26.10 | syncthing | Fix pending | UBUNTU-CVE-2022-31129 | |
| Ubuntu 26.10 | wordpress | Fix pending | UBUNTU-CVE-2022-31129 | |
| Ubuntu 26.04 | gnucash | Under investigation | UBUNTU-CVE-2022-31129 | |
| Ubuntu 26.04 | mediawiki | Under investigation | UBUNTU-CVE-2022-31129 | |
| Ubuntu 26.04 | node-moment | Not affected vulnerable_code_not_present | ||
| Ubuntu 26.04 | odoo | Under investigation | UBUNTU-CVE-2022-31129 | |
| Ubuntu 26.04 | postfixadmin | Fix pending | UBUNTU-CVE-2022-31129 | |
| Ubuntu 26.04 | sabnzbdplus | Under investigation | UBUNTU-CVE-2022-31129 | |
| Ubuntu 26.04 | syncthing | Fix pending | UBUNTU-CVE-2022-31129 | |
| Ubuntu 26.04 | wordpress | Under investigation | UBUNTU-CVE-2022-31129 | |
| Ubuntu 25.10 | gnucash | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | UBUNTU-CVE-2022-31129 | |
| Ubuntu 25.10 | mediawiki | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | UBUNTU-CVE-2022-31129 | |
| Ubuntu 25.10 | node-moment | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | ntopng | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | UBUNTU-CVE-2022-31129 | |
| Ubuntu 25.10 | odoo | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | UBUNTU-CVE-2022-31129 | |
| Ubuntu 25.10 | omnidb | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | UBUNTU-CVE-2022-31129 | |
| Ubuntu 25.10 | postfixadmin | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | UBUNTU-CVE-2022-31129 | |
| Ubuntu 25.10 | sabnzbdplus | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | UBUNTU-CVE-2022-31129 | |
| Ubuntu 25.10 | syncthing | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | UBUNTU-CVE-2022-31129 | |
| Ubuntu 25.10 | wordpress | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | UBUNTU-CVE-2022-31129 | |
| Ubuntu 24.04 | gnucash | Under investigation | UBUNTU-CVE-2022-31129 | |
| Ubuntu 24.04 | mediawiki | Fix pending | UBUNTU-CVE-2022-31129 | |
| Ubuntu 24.04 | node-moment | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | ntopng | Under investigation | UBUNTU-CVE-2022-31129 | |
| Ubuntu 24.04 | odoo | Under investigation | UBUNTU-CVE-2022-31129 | |
| Ubuntu 24.04 | omnidb | Under investigation | UBUNTU-CVE-2022-31129 | |
| Ubuntu 24.04 | postfixadmin | Fix pending | UBUNTU-CVE-2022-31129 | |
| Ubuntu 24.04 | ruby-momentjs-rails | Under investigation | UBUNTU-CVE-2022-31129 | |
| Ubuntu 24.04 | sabnzbdplus | Under investigation | UBUNTU-CVE-2022-31129 | |
| Ubuntu 24.04 | syncthing | Fix pending | UBUNTU-CVE-2022-31129 | |
| Ubuntu 24.04 | wordpress | Under investigation | UBUNTU-CVE-2022-31129 | |
| Ubuntu 22.04 | gnucash | Under investigation | UBUNTU-CVE-2022-31129 | |
| Ubuntu 22.04 | mediawiki | Fix pending | UBUNTU-CVE-2022-31129 | |
| Ubuntu 22.04 | node-moment | Fixed | 2.29.1+ds-3ubuntu0.2 | UBUNTU-CVE-2022-31129 |
| Ubuntu 22.04 | ntopng | Under investigation | UBUNTU-CVE-2022-31129 | |
| Ubuntu 22.04 | odoo | Under investigation | UBUNTU-CVE-2022-31129 | |
| Ubuntu 22.04 | omnidb | Under investigation | UBUNTU-CVE-2022-31129 | |
| Ubuntu 22.04 | postfixadmin | Fix pending | 3.3.10-2ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2022-31129 |
| Ubuntu 22.04 | ruby-momentjs-rails | Under investigation | UBUNTU-CVE-2022-31129 | |
| Ubuntu 22.04 | sabnzbdplus | Under investigation | UBUNTU-CVE-2022-31129 | |
| Ubuntu 22.04 | syncthing | Fix pending | UBUNTU-CVE-2022-31129 | |
| Ubuntu 22.04 | wordpress | Under investigation | UBUNTU-CVE-2022-31129 | |
| Ubuntu 20.04 | gnucash | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | UBUNTU-CVE-2022-31129 | |
| Ubuntu 20.04 | mediawiki | Fix pending | UBUNTU-CVE-2022-31129 | |
| Ubuntu 20.04 | node-moment | Fixed | 2.24.0+ds-2ubuntu0.1 | UBUNTU-CVE-2022-31129 |
| Ubuntu 20.04 | ntopng | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | UBUNTU-CVE-2022-31129 | |
| Ubuntu 20.04 | omnidb | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | UBUNTU-CVE-2022-31129 | |
| Ubuntu 20.04 | ruby-momentjs-rails | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | UBUNTU-CVE-2022-31129 | |
| Ubuntu 20.04 | sabnzbdplus | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | UBUNTU-CVE-2022-31129 | |
| Ubuntu 20.04 | syncthing | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | UBUNTU-CVE-2022-31129 | |
| Ubuntu 20.04 | wordpress | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | UBUNTU-CVE-2022-31129 | |
| Ubuntu 18.04 | gnucash | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | UBUNTU-CVE-2022-31129 | |
| Ubuntu 18.04 | mediawiki | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | UBUNTU-CVE-2022-31129 | |
| Ubuntu 18.04 | node-moment | Fixed | 2.20.1+ds-1ubuntu0.1 | UBUNTU-CVE-2022-31129 |
| Ubuntu 18.04 | ntopng | Fix pending | UBUNTU-CVE-2022-31129 | |
| Ubuntu 18.04 | sabnzbdplus | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | UBUNTU-CVE-2022-31129 | |
| Ubuntu 18.04 | syncthing | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | UBUNTU-CVE-2022-31129 | |
| Ubuntu 18.04 | wordpress | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | UBUNTU-CVE-2022-31129 | |
| Ubuntu 16.04 | gnucash | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | UBUNTU-CVE-2022-31129 | |
| Ubuntu 16.04 | node-moment | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | UBUNTU-CVE-2022-31129 | |
| Ubuntu 16.04 | ntopng | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | UBUNTU-CVE-2022-31129 | |
| Ubuntu 16.04 | postfixadmin | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | ||
| Ubuntu 16.04 | sabnzbdplus | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | UBUNTU-CVE-2022-31129 | |
| Ubuntu 16.04 | wordpress | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | UBUNTU-CVE-2022-31129 | |
| Ubuntu 14.04 | gnucash | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | ||
| Ubuntu 14.04 | mediawiki | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | ||
| Ubuntu 14.04 | postfixadmin | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | ||
| Ubuntu 14.04 | sabnzbdplus | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | ||
| Ubuntu 14.04 | wordpress | Will not fix postfixadmin in focal and earlier does not contain embedded copies of JavaScript moment. In jammy and later releases moment.js is available through Bootstrap… | ||
| Debian 14 | node-moment | Fixed | 2.29.4+ds-1 | DEBIAN-CVE-2022-31129 |
| Debian 13 | node-moment | Fixed | 2.29.4+ds-1 | DEBIAN-CVE-2022-31129 |
| Debian 12 | node-moment | Fixed | 2.29.4+ds-1 | DEBIAN-CVE-2022-31129 |
| Red Hat Enterprise Linux 9 | cockpit | Not affected | ||
| Red Hat Enterprise Linux 9 | cockpit-bridge | Not affected | ||
| Red Hat Enterprise Linux 9 | cockpit-composer | Not affected | ||
| Red Hat Enterprise Linux 9 | cockpit-doc | Not affected | ||
| Red Hat Enterprise Linux 9 | cockpit-packagekit | Not affected | ||
| Red Hat Enterprise Linux 9 | cockpit-pcp | Not affected | ||
| Red Hat Enterprise Linux 9 | cockpit-session-recording | Not affected | ||
| Red Hat Enterprise Linux 9 | cockpit-storaged | Not affected | ||
| Red Hat Enterprise Linux 9 | cockpit-system | Not affected | ||
| Red Hat Enterprise Linux 9 | cockpit-ws | Not affected | ||
| Red Hat Enterprise Linux 9 | cockpit-ws-selinux | Not affected | ||
| Red Hat Enterprise Linux 9 | grafana | Not affected | ||
| Red Hat Enterprise Linux 9 | grafana-selinux | Not affected | ||
| Red Hat Enterprise Linux 9 | rhsm-icons | Not affected | ||
| Red Hat Enterprise Linux 9 | subscription-manager-cockpit | Not affected | ||
| Red Hat Enterprise Linux 8 | 389-ds-base | Not affected | ||
| Red Hat Enterprise Linux 8 | 389-ds-base-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | 389-ds-base-legacy-tools | Not affected | ||
| Red Hat Enterprise Linux 8 | 389-ds-base-libs | Not affected | ||
| Red Hat Enterprise Linux 8 | 389-ds-base-snmp | Not affected | ||
| Red Hat Enterprise Linux 8 | cockpit | Not affected | ||
| Red Hat Enterprise Linux 8 | cockpit-389-ds | Not affected | ||
| Red Hat Enterprise Linux 8 | cockpit-bridge | Not affected | ||
| Red Hat Enterprise Linux 8 | cockpit-composer | Not affected | ||
| Red Hat Enterprise Linux 8 | cockpit-dashboard | Not affected | ||
| Red Hat Enterprise Linux 8 | cockpit-doc | Not affected | ||
| Red Hat Enterprise Linux 8 | cockpit-machines | Not affected | ||
| Red Hat Enterprise Linux 8 | cockpit-packagekit | Not affected | ||
| Red Hat Enterprise Linux 8 | cockpit-pcp | Not affected | ||
| Red Hat Enterprise Linux 8 | cockpit-podman | Not affected | ||
| Red Hat Enterprise Linux 8 | cockpit-session-recording | Not affected | ||
| Red Hat Enterprise Linux 8 | cockpit-storaged | Not affected | ||
| Red Hat Enterprise Linux 8 | cockpit-system | Not affected | ||
| Red Hat Enterprise Linux 8 | cockpit-ws | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-azure-monitor | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-cloudwatch | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-elasticsearch | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-graphite | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-influxdb | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-loki | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-mssql | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-mysql | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-opentsdb | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-postgres | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-prometheus | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-selinux | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-stackdriver | Not affected | ||
| Red Hat Enterprise Linux 8 | python3-lib389 | Not affected | ||
| npm library | moment | Fixed | 2.29.4 | GHSA-wc69-rhjr-hc9g |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- moment: affected: >= 2.18.0, < 2.29.4
Vendor advisories:
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
References
- 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
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.