Improper resource allocation In stdlib
Description
(*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.
Mitigation
Update Impact
Minimal update. May introduce new vulnerabilities or breaking changes.
Ecosystem | Package | Affected version | Patched versions |
|---|---|---|---|
go | 1.25.11 | ||
debian 11 | - | ||
debian 12 | - | ||
debian 13 | - | ||
debian 14 | - | ||
debian 14 | - |
Aliases
1. 2. 3. 4. 5. 6. 7.
References
1. 2. 3. 4.