parse-duration has a Regex Denial of Service that results in event loop delay and out of memory
CVE-2025-25283GHSA-hcrg-fc28-fcg5
What to do
Vendor fix available. Upgrade each affected package to the fixed version on its release line (parse-duration 2.1.3), redeploy, then verify what is actually installed.
This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.
Affected packages
npm parse-duration
- Affected
- < 2.1.3
- Fixed in
- 2.1.3
Sources
- Open Source Vulnerabilities (OSV.dev), including the GitHub Advisory Database
OSV record GHSA-hcrg-fc28-fcg5 lists affected ranges: npm parse-duration >=0 <2.1.3 (fixed)
VerifiedObserved Structured OSV record; GitHub-reviewed advisory.
- GitHub Advisory Database and maintainer security advisories on GitHub
GitHub-reviewed advisory GHSA-hcrg-fc28-fcg5 lists affected ranges: npm parse-duration >=0 <2.1.3
VerifiedObserved Structured GitHub Advisory Database record (type=reviewed) from the GitHub REST API.
Severity and exploitation
- Exploitation
- No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
- CVSS
- 7.5 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- EPSS
- CVE-2025-25283: 0.77% estimated exploitation activity in the next 30 days; percentile 55.81 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description
As published by the source; long descriptions are shortened.
Summary 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. PoC Refer to the following proof of concept code that provides a test case and makes use of the regular expression in the library as its test case to match against strings: The results of this on the cloud machine that I ran this on are as follows: You can note that: 1. 0.01 MB of input was enough to cause a 1ms delay (0.92ms) 2. Ranging from either 3 MB to 4 MB of input results in almost a full second day (728ms) and 42 ms, depending on the characters used in the text passed to the library's parse() function 3. A 200 MB of input size already…
Dates and revisions
- Published by the source
- Last modified by the source
- Source last checked
- Revision 2 · amended ·
Amended from ghsa record GHSA-hcrg-fc28-fcg5
- Revision 1 · created ·
Published from osv record GHSA-hcrg-fc28-fcg5
Agent brief
Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.
# Patch Next advisory brief: CVE-2025-25283 Advisory: parse-duration has a Regex Denial of Service that results in event loop delay and out of memory IDs: CVE-2025-25283, GHSA-hcrg-fc28-fcg5 Record: https://patchnext.com/advisories/cve-2025-25283 (revision 2, source checked 26 Oct 2026, 12:36 UTC) Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected. Severity: High (CVSS 7.5) Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV. Vendor response: Vendor fix available; fixed versions by package: parse-duration 2.1.3. A vendor fix does not mean a deployment is fixed. ## Affected components - npm parse-duration: affected < 2.1.3; fixed in 2.1.3 ## Suggested inspection (read-only) - `npm ls parse-duration --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`. ## Supported action Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version. ## Required regression checks - Run the test suite and a production build. - Exercise the features that depend on parse-duration. - Repeat the inspection and confirm that only fixed versions remain installed. ## Rollback considerations - Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward. ## Unresolved questions - Which deployments run an affected version? - Exploitation status can change. Check again before lowering the priority. - Mark the work resolved only after the fixed version is verified in production. ## Sources - Verified: https://osv.dev/vulnerability/GHSA-hcrg-fc28-fcg5 (OSV record GHSA-hcrg-fc28-fcg5 lists affected ranges: npm parse-duration >=0 <2.1.3 (fixed)) - Verified: https://github.com/advisories/GHSA-hcrg-fc28-fcg5 (GitHub-reviewed advisory GHSA-hcrg-fc28-fcg5 lists affected ranges: npm parse-duration >=0 <2.1.3) Commands are suggestions: review each one before running it.
Loading voting…