GHSA-phc3-fgpg-7m6h

Suggest an improvement
Source
https://github.com/advisories/GHSA-phc3-fgpg-7m6h
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-phc3-fgpg-7m6h/GHSA-phc3-fgpg-7m6h.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-phc3-fgpg-7m6h
Aliases
Downstream
Related
Published
2026-03-13T20:37:58Z
Modified
2026-03-18T23:58:57.714731Z
Severity
  • 5.9 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
Undici has Unbounded Memory Consumption in its DeduplicationHandler via Response Buffering that leads to DoS
Details

Impact

This is an uncontrolled resource consumption vulnerability (CWE-400) that can lead to Denial of Service (DoS).

In vulnerable Undici versions, when interceptors.deduplicate() is enabled, response data for deduplicated requests could be accumulated in memory for downstream handlers. An attacker-controlled or untrusted upstream endpoint can exploit this with large/chunked responses and concurrent identical requests, causing high memory usage and potential OOM process termination.

Impacted users are applications that use Undici’s deduplication interceptor against endpoints that may produce large or long-lived response bodies.

Patches

The issue has been patched by changing deduplication behavior to stream response chunks to downstream handlers as they arrive (instead of full-body accumulation), and by preventing late deduplication when body streaming has already started.

Users should upgrade to the first official Undici (and Node.js, where applicable) releases that include this patch.

Workarounds

If upgrading immediately is not possible:

  • Disable interceptors.deduplicate() for affected clients/routes.
  • Use skipHeaderNames with a marker header to force high-risk requests to bypass deduplication.
  • Avoid concurrent identical requests to untrusted endpoints that may return very large/chunked bodies.
  • Apply upstream/proxy response-size and timeout limits.
Database specific
{
    "github_reviewed": true,
    "github_reviewed_at": "2026-03-13T20:37:58Z",
    "cwe_ids": [
        "CWE-770"
    ],
    "nvd_published_at": "2026-03-12T21:16:25Z",
    "severity": "MODERATE"
}
References

Affected packages

npm / undici

Package

Affected ranges

Type
SEMVER
Events
Introduced
7.17.0
Fixed
7.24.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-phc3-fgpg-7m6h/GHSA-phc3-fgpg-7m6h.json"