Vulnerability library
Security checkFebruary 12, 2025

parse-duration has a Regex Denial of Service that results in event loop delay and out of memory

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

High severitynpmparse-duration

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

This report finds 2 availability issues due to the regex used in the parse-duration npm package:

  1. An event loop delay due to the CPU-bound operation of resolving the provided string, from a 0.5ms and up to ~50ms per one operation, with a varying size from 0.01 MB and up to 4.3 MB respectively.
  2. An out of memory that would crash a running Node.

Recommendation

Update the parse-duration package to the latest compatible version. Followings are version details:

  • Affected version(s): < 2.1.3
  • Patched version(s): 2.1.3

References

Could your website be exposed too?

SmartScanner can check your website for parse-duration has a Regex Denial of Service that results in event loop delay and out of memory and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated February 12, 2025