CVE-2024-24750: fetch(url) leads to a memory leak in undici
6.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.57204%
CWE
Published
2/16/2024
Updated
12/17/2024
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| undici | npm | >= 6.0.0, <= 6.6.0 | 6.6.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper backpressure handling in stream implementations. The commit diff shows critical changes:- In fetchFinale(): Replaced 'start' with 'pull' and added backpressure check (controller.desiredSize)- Added queuing strategies with explicit highWaterMark- Modified stream initialization in httpNetworkFetch. The original 'start' implementation's infinite read loop (while(true)) would continuously buffer data regardless of consumer readiness, matching the described memory leak scenario when body isn't consumed. The functions directly implement the streaming logic that failed to respect backpressure, making them clearly vulnerable.