Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. parse-duration
  4. ›
  5. CVE-2025-25283

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

February 12, 2025

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.js application due to a string size of roughly 10 MB that utilizes unicode characters.

References

  • github.com/advisories/GHSA-hcrg-fc28-fcg5
  • github.com/jkroso/parse-duration
  • github.com/jkroso/parse-duration/security/advisories/GHSA-hcrg-fc28-fcg5
  • nvd.nist.gov/vuln/detail/CVE-2025-25283

Code Behaviors & Features

Detect and mitigate CVE-2025-25283 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 2.1.3

Fixed versions

  • 2.1.3

Solution

Upgrade to version 2.1.3 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-1333: Inefficient Regular Expression Complexity

Source file

npm/parse-duration/CVE-2025-25283.yml

Spotted a mistake? Edit the file on GitLab.

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

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