undici vulnerable to TLS certificate validation bypass via dropped connect options in BalancedPool
### Impact undici's `BalancedPool` passes its constructor options through a JSON-based deep clone (`JSON.parse(JSON.stringify(...))`) before forwarding them to each per-upstream `Pool`. JSON cannot represent functions, so a caller-supplied `connect` or `tls` option containing a `checkServerIdentity` callback (or a custom connector function) is silently dropped before it reaches the TLS layer. As a result, a TLS peer whose certificate a custom `checkServerIdentity` was written to reject, but which passes Node's default hostname and chain checks, is silently accepted when the request is made through `BalancedPool`. `Client`, `Pool`, `Agent`, and `RoundRobinPool` destructure `connect`/`tls` before the clone and are not affected. Only applications that use `BalancedPool` with a function-valued `connect`/`tls` option (such as a custom `checkServerIdentity` or connector) are affected. ### Patches Upgrade to `7.29.1` or `8.10.2`. `BalancedPool` now preserves the `connect` and `tls` options outside the JSON clone, so custom TLS verification callbacks are forwarded to each upstream unchanged. ### Workarounds Use `Client`, `Pool`, or `Agent` instead of `BalancedPool` for connections that rely on a custom `checkServerIdentity` or connector, until upgraded.
GHSA-w293-vg96-wgc3
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-w293-vg96-wgc3
undici
Source reference: /affected/0/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- 7.29.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
- 8.10.2
Source reference:
/affected/1/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": "7.24.1"
},
{
"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-w293-vg96-wgc3/GHSA-w293-vg96-wgc3.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-w293-vg96-wgc3/GHSA-w293-vg96-wgc3.json"
}
}
]- Related CVEs
- CVE-2026-84961
Source reference:
/aliases
Publisher severity
high
Source reference: /database_specific/severity
- Event
- #31145 · Revision 1
- Added to Heist Feed
- Publisher date