In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsUpgrade undici to version 7.30.4, 8.14.1 or higher.
undici is an An HTTP/1.1 client, written from scratch for Node.js
Affected versions of this package are vulnerable to Insufficient Verification of Data Authenticity via the cache interceptor's background stale-while-revalidate revalidation path, when a shared cache serves a response inside its stale-while-revalidate window and the origin returns a 304 Not Modified whose ETag differs from the cached representation. The background revalidation path reuses the stored body and merges the 304's metadata around it, binding the old body to the new validator and freshness policy, instead of discarding the entry and refetching as the synchronous revalidation path does. A remote origin that answers the background conditional request with a mismatched-ETag 304 can therefore cause the shared cache to keep serving a stale representation, re-stamped with the new validator and lifetime, to later callers, potentially disclosing one caller's response body to another.
Note: This is only exploitable when a shared cache store is used and the origin returns a 304 with a mismatched ETag during background revalidation.
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.