Vulnerabilities in pkg:npm/date-and-time
PACKAGECVE-2020-26289 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Date and time libraries in the npm ecosystem. The issue involves regular expression denial of service (redos). Remediation is available by upgrading affected packages to version 0.14.2.
pkg:npm/date-and-time
Vulnerability advisories affecting package pkg:npm/date-and-time. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-r92x-f52r-x54g | CVE-2020-26289 | HIGH | regular expression denial of service (ReDoS) |
CVE-2020-26289 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-2020-26289
To remediate this vulnerability, upgrade all affected Date and time 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 date-and-time@0.14.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls date-and-time
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2020-26289, inspect your project dependencies using npm:
npm ls date-and-time
Analyze the terminal output to locate any version of Date and time in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.14.2), your application is affected.
Note: The npm ls date-and-time 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Date and time, 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-2020-26289 Affected Date and time Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
date-and-time
|
npm |
< 0.14.2
|
0.14.2
|
References
Frequently Asked Questions
What is CVE-2020-26289?
Which Date and time versions are affected?
What version fixes CVE-2020-26289?
Is date-and-time affected?
What is the CVSS score of CVE-2020-26289?
What CWE is associated with CVE-2020-26289?
How can I check npm dependencies for CVE-2020-26289?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-r92x-f52r-x54g",
"modified" : "2021-01-07T22:33:12Z",
"published" : "2020-12-24T20:49:02Z",
"aliases" : [ "CVE-2020-26289" ],
"summary" : "regular expression denial of service (ReDoS)",
"details" : "date-and-time is an npm package for manipulating date and time. In date-and-time before version 0.14.2, there a regular expression involved in parsing which can be exploited to to cause a denial of service. This is fixed in version 0.14.2.",
"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" : "date-and-time"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.14.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/knowledgecode/date-and-time/security/advisories/GHSA-r92x-f52r-x54g"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-26289"
}, {
"type" : "WEB",
"url" : "https://github.com/knowledgecode/date-and-time/commit/9e4b501eacddccc8b1f559fb414f48472ee17c2a"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/1592"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/package/date-and-time"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-12-24T20:31:22Z",
"nvd_published_at" : "2020-12-28T19:15:00Z"
}
}