# GHSA-8GC2-Q8WW-GHWG: undici vulnerable to Denial of Service via unbounded cache memory from tiny response chunks

- Database: GitHub
- Severity: CVSS 7.5 (High)
- Published: 2026-12-04
- Modified: 2026-12-04

## Tracked as

- [CVE-2026-137980](https://cve.now/CVE-2026-137980.md): undici denial of service via unbounded cache memory growth

## Affected versions

- undici (npm): from 7.0.0, fixed in 7.30.4
- undici (npm): from 8.0.0, fixed in 8.14.1

## Description

### Impact

undici's built-in cache stores, `MemoryCacheStore` and `SqliteCacheStore`, can be driven to exhaust process memory by a malicious or compromised HTTP origin. Both stores count response body bytes against their byte limits, but hold each delivered body chunk as a separate `Buffer`: `MemoryCacheStore` keeps the chunks in the cached entry, and `SqliteCacheStore` keeps them in memory until the response completes and is written to the database. A cacheable response framed as a large number of tiny chunks, for example a one million byte body sent as one million legal one-byte HTTP/1.1 chunks, holds one `Buffer` object per chunk, and that per-object overhead (over 100 bytes of heap per payload byte) is not bounded by the byte limits. With `MemoryCacheStore`, a few concurrent such responses, each below `maxEntrySize` and together below `maxSize`, can exhaust the heap and terminate the process while the advertised byte limits are still satisfied. With `SqliteCacheStore`, whose `maxEntrySize` defaults to 2 GB, a single such response is enough. The application only needs to compose the documented `cache` interceptor with either store and issue cacheable requests to the untrusted origin, which controls only the response. Availability is the only impact.

### Patches

Upgrade to `7.30.4` or `8.14.1`, which coalesce small body chunks into bounded buffers in both stores so that memory scales with the payload size rather than the chunk count.

### Workarounds

Until upgrading, avoid composing the `cache` interceptor, with either built-in store, with requests to untrusted origins.

### References

- [undici Cache Store documentation](https://github.com/nodejs/undici/blob/main/docs/docs/api/CacheStore.md)

## References

- https://github.com/nodejs/undici/security/advisories/GHSA-8gc2-q8ww-ghwg

Page: https://cve.now/GHSA-8GC2-Q8WW-GHWG

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
