CVE-2025-61729
Go vulnerability analysis and mitigation

Overview

CVE-2025-61729 is a Denial of Service vulnerability in Go's crypto/x509 package, specifically within the HostnameError.Error() method. When constructing an error string during certificate validation, there is no limit on the number of hosts printed, and the string is built via repeated concatenation, resulting in quadratic runtime complexity. A malicious actor can provide a crafted certificate to trigger excessive CPU and memory consumption. The vulnerability affects Go versions before 1.24.11 and versions 1.25.0 through 1.25.4. It was published on December 2, 2025, and carries a CVSS v3.1 base score of 7.5 (High) (MSRC Advisory, Go Vuln DB).

Technical details

The root cause is classified as CWE-295 (Improper Certificate Validation), with the specific flaw residing in the HostnameError.Error() function within Go's crypto/x509 standard library. When a certificate contains a large number of Subject Alternative Names (SANs) or hostnames that fail validation, the error message construction iterates over all hosts without any bound, and uses repeated string concatenation rather than a more efficient builder pattern, leading to O(n²) time and memory complexity. An unauthenticated remote attacker can exploit this by presenting a specially crafted TLS certificate with an excessive number of hostnames to any Go application that performs certificate hostname verification. The fix was implemented via a code change that limits host output and uses efficient string building (Go Issue, Go CL).

Impact

Successful exploitation results in a Denial of Service condition — specifically, excessive CPU and memory consumption that can degrade or crash the affected Go application or service. There is no confidentiality or integrity impact; the vulnerability is purely an availability issue. Any Go-based service that validates TLS certificates from untrusted sources (e.g., reverse proxies, API clients, service meshes) is at risk, and exploitation could cause service outages affecting downstream users and systems (Go Vuln DB, MSRC Advisory).

Exploitability

There is no public proof-of-concept exploit code and no evidence of in-the-wild exploitation at this time (Feedly). The vulnerability requires no authentication and no user interaction, making it trivially triggerable by any network attacker who can present a TLS certificate to a vulnerable Go application. The EPSS score is approximately 0.012% (0.000120), indicating a very low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. No threat actor attribution has been reported.

Exploitation steps

  1. Reconnaissance: Identify internet-facing services built with Go (versions < 1.24.11 or 1.25.0–1.25.4) that perform TLS certificate validation against client-supplied or server-supplied certificates (e.g., mutual TLS endpoints, Go-based HTTP clients connecting to attacker-controlled servers).
  2. Craft malicious certificate: Generate a TLS certificate containing an extremely large number of Subject Alternative Names (SANs) or hostnames — potentially thousands — that will fail hostname validation against the target.
  3. Present certificate: Establish a TLS connection to the target Go application (or act as a malicious server that the Go client connects to) and present the crafted certificate during the TLS handshake.
  4. Trigger DoS: When the Go runtime calls HostnameError.Error() to construct the validation error message, the unbounded iteration and quadratic string concatenation over all hostnames causes excessive CPU and memory consumption, potentially crashing or severely degrading the service (Go Issue, Go CL).

Indicators of compromise

  • Network: Unusual or repeated TLS handshake attempts from external sources presenting certificates with abnormally large numbers of Subject Alternative Names; connections from unexpected IP addresses to TLS-enabled Go services.
  • System: Sudden spike in CPU usage or memory consumption on Go application processes without a corresponding increase in legitimate traffic; OOM (out-of-memory) kills of Go service processes.
  • Logs: Application logs showing repeated certificate validation errors referencing large numbers of hostnames; Go runtime panic or crash logs related to memory allocation failures during TLS processing.
  • Process: Go application processes consuming disproportionate CPU or RAM, potentially triggering system-level alerts or watchdog restarts.

Mitigation and workarounds

The primary remediation is to upgrade Go to version 1.24.11 or later (for the 1.24.x branch) or 1.25.5 or later (for the 1.25.x branch), which contain the fix for this vulnerability (Go Vuln DB, Go CL). Downstream products embedding Go should also be updated: Microsoft has released patches for affected Azure Linux and CBL-Mariner packages (MSRC Advisory); IBM has released fixes for Instana OnPrem, Cloud Pak for Business Automation, Business Automation Workflow, watsonx Orchestrate, and Guardium Data Protection (IBM Advisory); Oracle addressed this in the April 2026 Critical Patch Update (Oracle CPU). As a temporary workaround where patching is not immediately possible, implement network controls to restrict untrusted certificate sources and limit exposure of TLS endpoints to unauthenticated external clients.

Community reactions

The vulnerability received broad coverage across Linux distribution security channels, with patches issued by SUSE, openSUSE, Red Hat, Oracle Linux, AlmaLinux, Rocky Linux, Fedora, Mageia, Amazon Linux, and Debian/FreeBSD-based distributions shortly after disclosure. Multiple open-source projects built on Go — including Docker (Moby), Grafana, Portainer, rclone, VictoriaMetrics, NATS Server, Prometheus Node Exporter, and cert-manager — tracked and addressed the issue in their respective release notes and issue trackers. The vulnerability was highlighted in Reddit's CVEWatch community as a top trending CVE in early December 2025, and security news aggregators such as LinuxSecurity.com and pro-linux.de published multiple advisories covering downstream package updates.

Additional resources


SourceThis report was generated using AI

Related Go vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2023-54365HIGH8.7
  • Go logoGo
  • trigger-dev
NoYesJun 23, 2026
CVE-2026-39822HIGH7.8
  • Go logoGo
  • timestamp-authority-fips
NoYesJul 08, 2026
CVE-2026-42504HIGH7.5
  • Go logoGo
  • buildah-tests
NoYesJun 02, 2026
CVE-2026-42505MEDIUM5.3
  • Go logoGo
  • gomplate-4
NoYesJul 08, 2026
CVE-2026-42507MEDIUM5.3
  • Go logoGo
  • libcap
NoYesJun 02, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management