CVE-2021-29486: cumulative-distribution-function Infinite Loop vulnerability
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.702%
CWE
Published
5/4/2021
Updated
1/29/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
cumulative-distribution-function | npm | < 2.0.0 | 2.0.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability manifests in two key phases:
- The cdf() entry point fails to validate input data types, allowing non-numeric values into the processing pipeline (CWE-20).
- The generated f(x) function's bisection search loop (while(true)) becomes unreachable when comparing string values, causing infinite CPU consumption (CWE-835).
Runtime detection would show:
- The cdf() function during input processing
- The anonymous f(x) evaluation function in a tight loop during exploitation
Patch changes confirm these points by adding type checks in cdf() and loop limits in f(x), directly addressing these two vulnerable components.