GHSA-2m5v-pch6-74hx

Suggest an improvement
Source
https://github.com/advisories/GHSA-2m5v-pch6-74hx
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-2m5v-pch6-74hx/GHSA-2m5v-pch6-74hx.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-2m5v-pch6-74hx
Aliases
Published
2026-10-27T19:02:26Z
Modified
2026-10-27T19:15:22Z
Severity
  • 7.4 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N CVSS Calculator
Summary
undici vulnerable to TLS certificate validation bypass via dropped tls options in Agent
Details

Impact

undici's Agent passes its constructor options through a JSON-based deep clone (JSON.parse(JSON.stringify(...))) before forwarding them to each per-origin Pool. JSON cannot represent functions, so a caller-supplied tls option containing a checkServerIdentity callback 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 Agent. Because Agent is the default dispatcher behind request, fetch, and setGlobalDispatcher, this is the path most applications use. EnvHttpProxyAgent is also affected on its direct and NO_PROXY routes, which delegate to an internal Agent.

Only applications that pass a function-valued tls option (such as a custom checkServerIdentity for certificate or public-key pinning) are affected. Passing the same options through connect is not affected. This is the Agent counterpart of the BalancedPool certificate validation bypass fixed in CVE-2026-84961.

Patches

Upgrade to undici 6.29.1, 7.30.1, or 8.12.2. Agent now preserves the tls option outside the JSON clone, so custom TLS verification callbacks are forwarded to each origin unchanged.

Workarounds

Pass the TLS options through connect instead of tls. For proxied EnvHttpProxyAgent destinations, use requestTls / proxyTls.

Database specific
{
    "cwe_ids":  [
        "CWE-295"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-10-27T19:02:26Z",
    "nvd_published_at":  "2026-10-15T19:17:20Z",
    "severity":  "HIGH"
}
References

Affected packages

npm / undici

Package

Affected ranges

Type
SEMVER
Events
Introduced
4.0.0
Fixed
6.29.1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-2m5v-pch6-74hx/GHSA-2m5v-pch6-74hx.json"

npm / undici

Package

Affected ranges

Type
SEMVER
Events
Introduced
7.0.0
Fixed
7.30.1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-2m5v-pch6-74hx/GHSA-2m5v-pch6-74hx.json"

npm / undici

Package

Affected ranges

Type
SEMVER
Events
Introduced
8.0.0
Fixed
8.12.2

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-2m5v-pch6-74hx/GHSA-2m5v-pch6-74hx.json"