Inefficient candidate hostname parsing in crypto/x509

Summary

CVECVE-2026-27145
StatePUBLISHED
AssignerGo
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-06-02 23:16:35 UTC
Updated2026-06-02 23:16:35 UTC
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.

Risk And Classification

Problem Types: CWE-407: Inefficient Algorithmic Complexity

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Go Standard Library Crypto/x509 affected 1.25.11 semver Not specified
CNA Go Standard Library Crypto/x509 affected 1.26.0-0 1.26.4 semver Not specified

References

ReferenceSourceLinkTags
go.dev/cl/783621 [email protected] go.dev
pkg.go.dev/vuln/GO-2026-5037 [email protected] pkg.go.dev
go.dev/issue/79694 [email protected] go.dev
groups.google.com/g/golang-announce/c/tKs3rmcBcKw [email protected] groups.google.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Vendor Comments And Credit

Discovery Credit

CNA: Jakub Ciolek - https://ciolek.dev/ (en)

© CVE.report 2026 |

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report