Skip to content

GHSA-2jfj-6hjv-fm6j CVE-2026-84933

undici vulnerable to cross-user cookie disclosure via Set-Cookie caching in shared caches

High npm
Severity
6.5 / 10
High · CVSS 3.1
Exploit chance (EPSS)
0.30%
Chance of exploitation in the next 30 days. Higher than 23.07% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
CWE-524 Use of Cache Containing Sensitive Information
Fix
7.29.1
Upgrade undici to this version or later

Description

Impact

undici's interceptors.cache() does not handle Set-Cookie in the cache path. In shared-cache mode (type: 'shared', the default), a cacheable response (for example Cache-Control: public, max-age=...) carrying a Set-Cookie header is stored, and the stored Set-Cookie is re-served to a later caller that hits the same cache key. This exposes one user's cookie to another caller and lets an untrusted upstream inject cookies into cached responses served to all subsequent callers, violating RFC 6265 section 7.2 (a shared cache must not store cookies). Applications using the shared cache interceptor against untrusted or multi-user upstreams are affected. Private caches (type: 'private') are not affected.

Patches

Upgrade to 7.29.1 or 8.10.2. In shared-cache mode, undici no longer stores or re-serves responses containing Set-Cookie, including previously cached entries and revalidation paths.

Workarounds

Use a private cache (type: 'private') for per-user responses, or avoid caching responses that set cookies. Applications acting as shared caches should strip Set-Cookie from responses before caching.

Affected versions

npm

PackageVulnerableFixed in
undici
>= 7.0.0, < 7.29.1
7.29.1
undici
>= 8.0.0, < 8.10.2
8.10.2
undici
>= 7.0.0, < 7.29.1
7.29.1
undici
>= 8.0.0, < 8.10.2
8.10.2

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

undici npm → 7.29.1

npm
npm install undici@7.29.1
yarn
yarn add undici@7.29.1
pnpm
pnpm add undici@7.29.1

Severity breakdown

CVSS 3.1 6.5

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
Low
Availability
None

Weakness

CWE-200: Exposure of Sensitive Information to an Unauthorized Actor

The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.

How to prevent it
  • Architecture and Design: Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.

CWE-524: Use of Cache Containing Sensitive Information

The code uses a cache that contains sensitive information, but the cache can be read by an actor outside of the intended control sphere.

How to prevent it
  • Architecture and Design: Protect information stored in cache.
  • Architecture and Design: Do not store unnecessarily sensitive information in the cache.
  • Architecture and Design: Consider using encryption in the cache.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-55wc-3pg8-jfw6
undici vulnerable to Denial of Service via unhandled exception in the decompress interceptor
High Also affects undici
GHSA-qrxm-fqhp-jwvm
undici vulnerable to Denial of Service via TLS 1.2 certificate-changing renegotiation
High Also affects undici
GHSA-9fm3-97px-rjf6
undici WebSocket client vulnerable to Denial of Service via unbounded automatic PONG buffering
High Also affects undici
GHSA-4qv8-2p9j-2685
undici vulnerable to Denial of Service via unbounded memory in the EventSource parser
High Also affects undici
GHSA-xjj6-f33q-929c
undici vulnerable to Denial of Service via unhandled error on excessive content-encodings
High Also affects undici
GHSA-f72v-6w45-q472
undici vulnerable to Subresource Integrity bypass via non-lowercase algorithm tokens
High Also affects undici
GHSA-4w7w-5xrc-9h26
undici vulnerable to cache poisoning and cross-user disclosure via cross-origin redirects
Critical Also affects undici
GHSA-2m5v-pch6-74hx
undici vulnerable to TLS certificate validation bypass via dropped tls options in Agent
Critical Also affects undici

Credits: UlisesGascon, mcollina

Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor