# CVE-2026-12151: undici WebSocket client vulnerable to denial of service via fragment count bypass

> A malicious WebSocket server can cause memory exhaustion and denial of service in applications using the undici WebSocket client by sending many small fragments.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 17 Jun 2026
- **Updated:** 11 Sep 2026
- **Also known as:** AZL-91191, CLEANSTART-2026-CY92802, CLEANSTART-2026-PM31207, DEBIAN-CVE-2026-12151, ECHO-f2ce-9c62-59ce, GHSA-vxpw-j846-p89q, MINI-3q3x-wj56-4jw2, MINI-45xp-g7vr-w6g8, MINI-4v4m-vpm3-78c2, MINI-4xrf-fwr7-vpxm, MINI-79w6-rwp9-c3f7, MINI-8pr6-vg8q-h6j9, MINI-9r4w-3fwx-q69p, MINI-frcf-52qg-rh4h, MINI-gxfr-rpwv-95wf, MINI-hvgx-wqv8-m4mc, MINI-hw7v-j98p-fc54, MINI-j843-rcj7-w7f4, MINI-jjch-78jh-77qv, MINI-mrc3-ghjg-9jcv, MINI-qv63-v4fh-hpxm, MINI-r5h3-hmrr-6m42, MINI-v9xx-rqpr-v895, MINI-x3wp-747m-7prv, MINI-xxqm-fr76-34f8, ROOT-APP-NPM-CVE-2026-12151, UBUNTU-CVE-2026-12151

## What is CVE-2026-12151?

CVE-2026-12151 is a high-severity denial of service vulnerability in Nodejs Undici, published on 17 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Impact:
The undici WebSocket client enforces maxPayloadSize on the cumulative byte count of fragments in a message but does not enforce a limit on the number of fragments. A malicious WebSocket server can stream many small or empty continuation frames that each pass per-frame and cumulative-size validation, collectively causing unbounded memory growth in the client process. The result is memory exhaustion and a denial of service.

Affected applications are those using the undici WebSocket client (new WebSocket(...)) or the WebSocketStream API that can be induced to connect to an attacker-controlled or compromised WebSocket endpoint.

All releases starting at undici 6.17.0 are affected.

Patches: Upgrade to undici >= 6.26.0, >= 7.28.0, or >= 8.5.0. Workarounds:
No workaround is available. The fix must be applied through an upgrade.

Weakness: CWE-770 (Allocation of Resources Without Limits or Throttling), CWE-400 (Uncontrolled Resource Consumption)

## Which versions are affected by CVE-2026-12151?

6 open source packages ship an affected version, including undici. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `undici` | npm | All versions | 6.27.0 |
| `undici` | npm | All versions | 6.27.0 |
| `undici` | npm | From 7.0.0 | 7.28.0 |
| `undici` | npm | From 7.0.0 | 7.28.0 |
| `undici` | npm | From 8.0.0 | 8.5.0 |
| `undici` | npm | From 8.0.0 | 8.5.0 |

Products: Nodejs Undici.

## How do I fix CVE-2026-12151?

Upgrade undici to a fixed version for your release line: 6.27.0, 7.28.0 or 8.5.0.

## Is CVE-2026-12151 being exploited?

There is no known exploitation of CVE-2026-12151 in the wild and no public exploit code.

## Other vulnerabilities in Nodejs Undici

- [CVE-2026-109855](https://insights.sbomify.com/CVE-2026-109855/): undici WebSocket client vulnerable to Denial of Service via failed HTTP/2 handshake (high 7.5)
- [CVE-2026-109869](https://insights.sbomify.com/CVE-2026-109869/): undici vulnerable to Denial of Service via unhandled error on excessive content-encodings (high 7.5)
- [CVE-2026-87018](https://insights.sbomify.com/CVE-2026-87018/): undici vulnerable to Denial of Service via TLS 1.2 certificate-changing renegotiation (high 7.5)
- [CVE-2026-19534](https://insights.sbomify.com/CVE-2026-19534/): undici vulnerable to Denial of Service via unrequested WebSocket subprotocol (high 7.5)
- [CVE-2026-6734](https://insights.sbomify.com/CVE-2026-6734/): undici vulnerable to cross-origin request routing via SOCKS5 proxy pool reuse (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-12151 and fix it if it is affected.

What it is: CVE-2026-12151 is a high-severity denial of service vulnerability in Nodejs Undici, published on 17 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-12151 in the wild and no public exploit code.

Affected packages and fixed versions:
- undici (npm): affected all versions; fixed in 6.27.0
- undici (npm): affected all versions; fixed in 6.27.0
- undici (npm): affected from 7.0.0; fixed in 7.28.0
- undici (npm): affected from 7.0.0; fixed in 7.28.0
- undici (npm): affected from 8.0.0; fixed in 8.5.0
- undici (npm): affected from 8.0.0; fixed in 8.5.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-12151/ (Markdown: https://insights.sbomify.com/CVE-2026-12151/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-12151
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-12151
- OSV: https://osv.dev/vulnerability/CVE-2026-12151

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-12151/
Summaries are generated and may contain mistakes; the official description above is the record.
