Vulnerability · Published Jan 4, 2023 · Assigned by GitHub_M
CVE-2023-22467luxon.js inefficient regular expression complexity vulnerability
High 7.5
In plain English
A high-severity regular-expression denial of service in luxon from moment. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.9% (higher than 79% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Luxon is a library for working with dates and times in JavaScript. On the 1.x branch prior to 1.38.1, the 2.x branch prior to 2.5.2, and the 3.x branch on 3.2.1, Luxon's `DateTime.fromRFC2822() has quadratic (N^2) complexity on some specific inputs. This causes a noticeable slowdown for inputs with lengths above 10k characters. Users providing untrusted data to this method are therefore vulnerable to (Re)DoS attacks. This issue also appears in Moment as CVE-2022-31129. Versions 1.38.1, 2.5.2, and 3.2.1 contain patches for this issue. As a workaround, limit the length of the input.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | luxon | 1.28.1 | GHSA-3xq5-wjfh-ppjc |
| npm | luxon | 2.5.2 | GHSA-3xq5-wjfh-ppjc |
| npm | luxon | 3.2.1 | GHSA-3xq5-wjfh-ppjc |
Affected products (as reported)
Weakness: CWE-1333 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
References
- https://github.com/moment/luxon/security/advisories/GHSA-3xq5-wjfh-ppjc x_refsource_CONFIRM
- https://github.com/moment/moment/security/advisories/GHSA-wc69-rhjr-hc9g x_refsource_MISC
- https://github.com/moment/moment/pull/6015#issuecomment-1152961973 x_refsource_MISC
- https://github.com/moment/luxon/commit/5ab3bf64a10da929a437629cdb2f059bb83212bf x_refsource_MISC
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4LIVOASKBQH7FEUI5RWM3SOHR6VK7ZZR/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/44I3WAJKYXDLOVYRGMHAUXMIV4SPFXDZ/