Regular Expression Denial of Service (ReDoS) Affecting millisecond Open this link in a new tab package, versions <0.1.2

  • Attack Complexity


Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • snyk-id


  • published

    25 Nov 2015

  • disclosed

    20 Nov 2015

  • credit

    Luigi Pinca

How to fix?

Upgrade to version 0.1.2.


Regular expression Denial of Service (ReDoS) vulnerability exists in milliseconds module, affecting version 0.1.1 and below.

milliseconds, the milliseconds conversion utility is used to convert times to milliseconds. The regular expression used by the function to parse the time is vulnerable to denial of service attack, where extremely long strings that are passed to milliseconds() can take long time to process and as a result block the event loop for that period.


"The Regular expression Denial of Service (ReDoS) is a Denial of Service attack, that exploits the fact that most Regular Expression implementations may reach extreme situations that cause them to work very slowly (exponentially related to input size). An attacker can then cause a program using a Regular Expression to enter these extreme situations and then hang for a very long time." [1]