undici vulnerable to Denial of Service via unrequested WebSocket subprotocol
### Impact The undici WebSocket client throws an uncaught `TypeError` during the opening handshake when a server's `101` response includes a `Sec-WebSocket-Protocol` header that the client never requested. The throw occurs in a `queueMicrotask` callback with no surrounding `try`/`catch`, so it propagates as an uncaught exception and terminates the Node.js process. This is a remote, unauthenticated denial of service against any application that opens a WebSocket to an attacker controlled or compromised server, or over a plaintext `ws://` connection subject to a machine-in-the-middle. It affects the default `new WebSocket(url)` usage, where no subprotocol is requested. Per RFC 6455 section 4.1, an unrequested subprotocol must fail the connection, not crash it. All releases starting at undici 6.7.0 are affected. ### Patches Upgrade to undici 6.28.1, 7.29.1, or 8.10.2. ### Workarounds No workaround is available. The fix must be applied through an upgrade.
GHSA-rfgv-xxqx-mfg5
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: osv:GHSA-rfgv-xxqx-mfg5
undici
Source reference: /affected/0/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- 6.28.1
Source reference:
/affected/0/ranges - Prerequisites
- Not stated in this record
undici
Source reference: /affected/1/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- 7.29.1
Source reference:
/affected/1/ranges - Prerequisites
- Not stated in this record
undici
Source reference: /affected/2/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- 8.10.2
Source reference:
/affected/2/ranges - Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "6.7.0"
},
{
"fixed": "6.28.1"
}
]
}
],
"package": {
"name": "undici",
"purl": "pkg:npm/undici",
"ecosystem": "npm"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-rfgv-xxqx-mfg5/GHSA-rfgv-xxqx-mfg5.json"
}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "7.0.0"
},
{
"fixed": "7.29.1"
}
]
}
],
"package": {
"name": "undici",
"purl": "pkg:npm/undici",
"ecosystem": "npm"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-rfgv-xxqx-mfg5/GHSA-rfgv-xxqx-mfg5.json"
}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "8.0.0"
},
{
"fixed": "8.10.2"
}
]
}
],
"package": {
"name": "undici",
"purl": "pkg:npm/undici",
"ecosystem": "npm"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-rfgv-xxqx-mfg5/GHSA-rfgv-xxqx-mfg5.json"
}
}
]- Related CVEs
- CVE-2026-19534
Source reference:
/aliases
Publisher severity
high
Source reference: /database_specific/severity
- Event
- #31152 · Revision 1
- Added to Heist Feed
- Publisher date