Skip to content

GHSA-f269-vfmq-vjvj CVE-2026-1528

Undici: Malicious WebSocket 64-bit length overflows parser and crashes the client

High npm
Severity
7.5 / 10
High · CVSS 3.1
Exploit chance (EPSS)
0.51%
Chance of exploitation in the next 30 days. Higher than 43.41% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-248 Uncaught Exception
CWE-1284 Improper Validation of Specified Quantity in Input
Fix
6.24.0
Upgrade undici to this version or later

Description

Impact

A server can reply with a WebSocket frame using the 64-bit length form and an extremely large length. undici's ByteParser overflows internal math, ends up in an invalid state, and throws a fatal TypeError that terminates the process.

Patches

Patched in the undici version v7.24.0 and v6.24.0. Users should upgrade to this version or later.

Workarounds

There are no workarounds.

Affected versions

npm

PackageVulnerableFixed in
undici
>= 6.0.0, < 6.24.0
6.24.0
undici
>= 7.0.0, < 7.24.0
7.24.0
undici
>= 6.0.0, < 6.24.0
6.24.0
undici
>= 7.0.0, < 7.24.0
7.24.0

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 → 6.24.0

npm
npm install undici@6.24.0
yarn
yarn add undici@6.24.0
pnpm
pnpm add undici@6.24.0

Severity breakdown

CVSS 3.1 7.5

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

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

Weakness

CWE-248: Uncaught Exception

An exception is thrown from a function, but it is not caught.

CWE-1284: Improper Validation of Specified Quantity in Input

The product receives input that is expected to specify a quantity (such as size or length), but it does not validate or incorrectly validates that the quantity has the required properties.

How to prevent it
  • Implementation: Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.

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