Read the docs
TI-2021-10199 Aliases CVE-2021-29486GHSA-58qp-5328-v7mh

Improper Input Validation and Loop with Unreachable Exit Condition ('Infinite Loop') in cumulative-distribution-function

Priority LOW 37CWE-20Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Denial of service
Confidentiality · integrity · availability
None · None · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-835.

Summary

cumulative-distribution-function is an open source npm library used which calculates statistical cumulative distribution function from data array of x values. In versions prior to 2.0.0 apps using this library on improper data may crash or go into an infinite-loop. In the case of a nodejs server-app using this library to act on invalid non-numeric data, the nodejs server may crash. This may affect other users of this server and/or require the server to be rebooted for proper operation. In the case of a browser app using this library to act on invalid non-numeric data, that browser may crash or lock up. A flaw enabling an infinite-loop was discovered in the code for evaluating the cumulative-distribution-function of input data. Although the documentation explains that numeric data is required, some users may confuse an array of strings like ["1","2","3","4","5"] for numeric data [1,2,3,4,5] when it is in fact string data. An infinite loop is possible when the cumulative-distribution-function is evaluated for a given point when the input data is string data rather than type `number`. This vulnerability enables an infinite-cpu-loop denial-of-service-attack on any app using npm:cumulative-distribution-function v1.0.3 or earlier if the attacker can supply malformed data to the library. The vulnerability could also manifest if a data source to be analyzed changes data type from Arrays of number (proper) to Arrays of string (invalid, but undetected by earlier version of the library). Users should upgrade to at least v2.0.0, or the latest version. Tests for several types of invalid data have been created, and version 2.0.0 has been tested to reject this invalid data by throwing a `TypeError()` instead of processing it. Developers using this library may wish to adjust their app's code slightly to better tolerate or handle this TypeError. Apps performing proper numeric data validation before sending data to this library should be mostly unaffected by this patch. The vulnerability can be mitigated in older versions by ensuring that only finite numeric data of type `Array[number]` or `number` is passed to `cumulative-distribution-function` and its `f(x)` function, respectively.

Why it matters now

EPSS 0.01979 80th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Fixed cumulative-distribution-function (DrPaulBrewer): 2.0.0cumulative-distribution-function (npm): 2.0.0

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
DrPaulBrewercumulative-distribution-functionbefore 2.0.02.0.0Patch availableCNA
—cumulative-distribution-function (npm)before 2.0.02.0.0Patch availableGHSA-58qp-5328-v7mh
  • cumulative-distribution-function VendorDrPaulBrewer Affected before 2.0.0 Fixed in 2.0.0 Patch available CNA
  • cumulative-distribution-function (npm) Vendor— Affected before 2.0.0 Fixed in 2.0.0 Patch available GHSA-58qp-5328-v7mh

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:cumulative-distribution-function_project:cumulative-distribution-function:*:*:*:*:*:node.js:*:*before 2.0.0VulnerableCumulative-distribution-function Project

Remediation

  • Fix · CNA cumulative-distribution-function (DrPaulBrewer) Fixed in 2.0.0
  • Fix · GHSA-58qp-5328-v7mh cumulative-distribution-function (npm) Fixed in 2.0.0 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2021-29486
  2. 2026-10-03 Alias added: GHSA-58qp-5328-v7mh

References

Sources