Vulnerabilities in pkg:npm/millisecond

PACKAGE
Advisory Summary

GHSA-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.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/millisecond

1 Known Advisory Record(s)

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

CVE Identifier N/A
GHSA Identifier GHSA-m489-xr35-fjxr
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Millisecond
Package Ecosystem npm
Published Date
Last Updated

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.

millisecond fixed: 0.1.2
npm install millisecond@0.1.2
Verify Direct and Transitive Dependencies

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

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. ## Proof of concept ``` var ms = require('millisecond'); var genstr = function (len, chr) { var result = ""; for (i=0; i<=len; i++) { result = result + chr; } return result; } ms(genstr(process.argv[2], "5") + " minutea"); ``` ## Recommendation Update to version 0.1.2 or later.

GHSA-m489-xr35-fjxr Affected Millisecond Versions

1 component(s)
Fixed Versions:
0.1.2
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?
GHSA-m489-xr35-fjxr is a security vulnerability in Millisecond involving Regular Expression Denial of Service in millisecond under CWE-400: Uncontrolled Resource Consumption.
Which Millisecond versions are affected?
Affected versions include releases prior to 0.1.2 across affected packages: millisecond.
What version fixes GHSA-m489-xr35-fjxr?
Upgrading to 0.1.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is millisecond affected?
Yes, millisecond is affected in releases prior to 0.1.2. Upgrade your dependency to 0.1.2 or later.
What CWE is associated with GHSA-m489-xr35-fjxr?
GHSA-m489-xr35-fjxr is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check npm dependencies for GHSA-m489-xr35-fjxr?
Run the dependency tree command: 'npm ls millisecond'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}