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

Project Subscriptions

Vendors Products
Go Standard Library Subscribe
Crypto/x509 Subscribe
Advisories

No advisories yet.

Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

Wed, 03 Jun 2026 04:15:00 +0000

Type Values Removed Values Added
First Time appeared Go Standard Library
Go Standard Library crypto/x509
Weaknesses CWE-400
Vendors & Products Go Standard Library
Go Standard Library crypto/x509

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

Projects

Sign in to view the affected projects.

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

Updated: 2026-06-03T04:00:13Z

Weaknesses