Vulnerabilities in pkg:npm/luxon
PACKAGECVE-2023-22467 is a HIGH (CVSS 7.5) luxon inefficient regular expression complexity vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting Luxon libraries in the npm ecosystem. The issue involves luxon inefficient regular expression complexity vulnerability. Remediation is available by upgrading affected packages to version 1.28.1, 2.5.2, 3.2.1.
pkg:npm/luxon
Vulnerability advisories affecting package pkg:npm/luxon. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-3xq5-wjfh-ppjc | CVE-2023-22467 | HIGH | Luxon Inefficient Regular Expression Complexity vulnerability |
CVE-2023-22467 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2023-22467
To remediate this vulnerability, upgrade all affected Luxon dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install luxon@1.28.1
npm install luxon@2.5.2
npm install luxon@3.2.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls luxon
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2023-22467, inspect your project dependencies using npm:
npm ls luxon
Analyze the terminal output to locate any version of Luxon in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.28.1), your application is affected.
Note: The npm ls luxon command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. In Luxon, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-22467 Affected Luxon Versions
3 component(s)References
Frequently Asked Questions
What is CVE-2023-22467?
Which Luxon versions are affected?
What version fixes CVE-2023-22467?
Is luxon affected?
What is the CVSS score of CVE-2023-22467?
What CWE is associated with CVE-2023-22467?
How can I check npm dependencies for CVE-2023-22467?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3xq5-wjfh-ppjc",
"modified" : "2024-02-12T06:30:33Z",
"published" : "2023-01-09T14:10:49Z",
"aliases" : [ "CVE-2023-22467" ],
"summary" : "Luxon Inefficient Regular Expression Complexity vulnerability",
"details" : "# Impact\nLuxon'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.\n\nThis is the same bug as Moment's https://github.com/moment/moment/security/advisories/GHSA-wc69-rhjr-hc9g\n\n# Workarounds\nLimit the length of the input.\n\n# References\nThere is an excellent writeup of the same issue in Moment: https://github.com/moment/moment/pull/6015#issuecomment-1152961973\n\n# Details\n`DateTime.fromRFC2822(\"(\".repeat(500000))` takes a couple minutes to complete.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "luxon"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.0.0"
}, {
"fixed" : "1.28.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "luxon"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.5.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "luxon"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.2.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/moment/luxon/security/advisories/GHSA-3xq5-wjfh-ppjc"
}, {
"type" : "WEB",
"url" : "https://github.com/moment/moment/security/advisories/GHSA-wc69-rhjr-hc9g"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-22467"
}, {
"type" : "WEB",
"url" : "https://github.com/moment/moment/pull/6015#issuecomment-1152961973"
}, {
"type" : "WEB",
"url" : "https://github.com/moment/luxon/commit/5ab3bf64a10da929a437629cdb2f059bb83212bf"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/moment/luxon"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/44I3WAJKYXDLOVYRGMHAUXMIV4SPFXDZ"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4LIVOASKBQH7FEUI5RWM3SOHR6VK7ZZR"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1333" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-01-09T14:10:49Z",
"nvd_published_at" : "2023-01-04T22:15:00Z"
}
}