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.

Severity (CVSS 3.1)7.5High
Exploit odds (30 days)1.9%top 20.8% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
npmluxon1.28.1GHSA-3xq5-wjfh-ppjc
npmluxon2.5.2GHSA-3xq5-wjfh-ppjc
npmluxon3.2.1GHSA-3xq5-wjfh-ppjc

Affected products (as reported)

VendorProductVersions
moment luxon >= 1.0.0, < 1.38.1>= 2.0.0, < 2.5.2>= 3.0.0, < 3.2.1

Weakness: CWE-1333 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References