CVE-2026-27145

Inefficient candidate hostname parsing in crypto/x509

State
Published
Severity
6.5 Medium
Published
Jun 2, 2026
Updated
Sep 18, 2026
Reserved
Feb 17, 2026

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.16.5 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:HCISA-ADP
3.17.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:Hredhat-SADP

Weaknesses

  • CWE-606 Unchecked Input for Loop Condition

Affected Products

ProductVersions
crypto/x509Go standard library
  • before 1.25.11Affected
  • 1.26.0-0 to before 1.26.4Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.