Vulnerabilities in pkg:npm/millisecond
PACKAGEGHSA-m489-xr35-fjxr is a MODERATE denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Millisecond libraries in the npm ecosystem. The issue involves regular expression denial of service in millisecond. Remediation is available by upgrading affected packages to version 0.1.2.
pkg:npm/millisecond
Vulnerability advisories affecting package pkg:npm/millisecond. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-m489-xr35-fjxr | - | MODERATE | Regular Expression Denial of Service in millisecond |
GHSA-m489-xr35-fjxr at a Glance
How to Fix GHSA-m489-xr35-fjxr
To remediate this vulnerability, upgrade all affected Millisecond 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 millisecond@0.1.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls millisecond
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-m489-xr35-fjxr, inspect your project dependencies using npm:
npm ls millisecond
Analyze the terminal output to locate any version of Millisecond in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.2), your application is affected.
Note: The npm ls millisecond 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 Millisecond, 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
GHSA-m489-xr35-fjxr Affected Millisecond Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
millisecond
|
npm |
< 0.1.2
|
0.1.2
|
References
Frequently Asked Questions
What is GHSA-m489-xr35-fjxr?
Which Millisecond versions are affected?
What version fixes GHSA-m489-xr35-fjxr?
Is millisecond affected?
What CWE is associated with GHSA-m489-xr35-fjxr?
How can I check npm dependencies for GHSA-m489-xr35-fjxr?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-m489-xr35-fjxr",
"modified" : "2021-09-22T20:34:42Z",
"published" : "2021-09-22T20:35:08Z",
"aliases" : [ ],
"summary" : "Regular Expression Denial of Service in millisecond",
"details" : "Versions of `millisecond` prior to 0.1.2 are affected by a regular expression denial of service vulnerability when extremely long version strings are parsed.\n\n\n## Proof of concept\n```\nvar ms = require('millisecond');\nvar genstr = function (len, chr) {\n var result = \"\";\n for (i=0; i<=len; i++) {\n result = result + chr;\n }\n\n return result;\n}\n\nms(genstr(process.argv[2], \"5\") + \" minutea\");\n```\n\n\n## Recommendation\n\nUpdate to version 0.1.2 or later.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "millisecond"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.1.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/unshiftio/millisecond/pull/4"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/59"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1333", "CWE-400" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-09-22T20:34:42Z",
"nvd_published_at" : null
}
}