# GHSA-QPMW-HMF2-3J36: undici vulnerable to cross-user cache disclosure via mismatched-ETag 304 revalidation

- Database: GitHub
- Severity: CVSS 6.5 (Medium)
- Published: 2026-12-04
- Modified: 2026-12-04

## Tracked as

- [CVE-2026-129981](https://cve.now/CVE-2026-129981.md): undici cross-user response disclosure in HTTP cache revalidation

## Affected versions

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

## Description

### Impact

undici's cache interceptor, when composed with a shared cache (`type: 'shared'`, the default) and serving a response inside its `stale-while-revalidate` window, revalidates the stored response in the background. When that background `304 Not Modified` carries an `ETag` that differs from the cached representation, undici reuses the stored body and merges the 304's metadata around it, binding the old body to the new validator and freshness policy. The synchronous revalidation path already rejects a mismatched validator and refetches; the background path did not.

A remote origin that answers the background conditional request with a `304` and a different `ETag` can therefore make the shared cache keep serving a stale representation, re-stamped with the new validator and lifetime, to later callers. On a shared cache that holds per-caller or otherwise sensitive responses, this can disclose one caller's body to another and serve a body the origin has already replaced. Applications are affected only when a shared cache store is used and the origin returns a mismatched-ETag `304` during background revalidation; per-caller stores and genuinely public representations are not affected. The cache interceptor was introduced in undici 7.0.0, and the background revalidation reuse is present from 7.17.0 through the patched versions.

### Patches

Upgrade to `7.30.4` or `8.14.1`. The background revalidation path now compares the `304` response's `ETag` with the cached representation's validator before reusing the body, and on a mismatch it discards the stored entry and refetches unconditionally, matching the synchronous path.

### Workarounds

Use a per-caller cache store instead of a shared one for responses that are not safe to serve across callers, or set `no-store` or `private` on such responses so they are not retained in a shared cache.

## References

- https://github.com/nodejs/undici/security/advisories/GHSA-qpmw-hmf2-3j36

Page: https://cve.now/GHSA-QPMW-HMF2-3J36

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