Inefficient candidate hostname parsing in crypto/x509
(*x509.Certificate).VerifyHostname previously called matchHostnames in a loop over all DNS Subject Alternative Name (SAN) entries. This caused strings.Split(host, ".") to execute repeatedly on the same input hostname. With a large DNS SAN list, verification costs scaled quadratically based on the number of SAN entries multiplied by the hostname's label count. Because x509.Verify validates hostnames before building the certificate chain, this overhead occurred even for untrusted certificates.
GO-2026-5037
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:GO-2026-5037
stdlib
Source reference: /affected/0/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- 1.25.11
Source reference:
/affected/0/ranges1.26.4Source reference:
/affected/0/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": "0"
},
{
"fixed": "1.25.11"
},
{
"introduced": "1.26.0-0"
},
{
"fixed": "1.26.4"
}
]
}
],
"package": {
"name": "stdlib",
"purl": "pkg:golang/stdlib",
"ecosystem": "Go"
},
"database_specific": {
"source": "https://vuln.go.dev/ID/GO-2026-5037.json"
},
"ecosystem_specific": {
"imports": [
{
"path": "crypto/x509",
"symbols": [
"Certificate.Verify",
"Certificate.VerifyHostname",
"HostnameError.Error",
"matchHostnames"
]
}
]
}
}
]- Related CVEs
- CVE-2026-27145
Source reference:
/aliases
Publisher severity
No explicit severity was provided.
- Event
- #67918 · Revision 1
- Added to Heist Feed
- Publisher date