(*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.
History

Wed, 03 Jun 2026 02:30:00 +0000

Type Values Removed Values Added
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.
Title Inefficient candidate hostname parsing in crypto/x509
References

cve-icon MITRE

Status: PUBLISHED

Assigner: Go

Published:

Updated: 2026-06-02T22:01:36.954Z

Reserved: 2026-02-17T19:57:28.435Z

Link: CVE-2026-27145

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-06-02T23:16:35.570

Modified: 2026-06-02T23:16:35.570

Link: CVE-2026-27145

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

No data.