CVE-2025-61729 Excessive resource consumption when printing error string for host certificate validation in crypto/x509

High 7.5 Published Updated

A malicious certificate can cause excessive resource consumption in Go's crypto/x509 package during error string generation, leading to denial of service.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-61729?

CVE-2025-61729 is a high-severity denial of service vulnerability in Golang Go, published on 2 Dec 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Within HostnameError.Error(), when constructing an error string, there is no limit to the number of hosts that will be printed out. Furthermore, the error string is constructed by repeated string concatenation, leading to quadratic runtime. Therefore, a certificate provided by a malicious actor can result in excessive resource consumption.

Weakness: CWE-295

Which versions are affected by CVE-2025-61729?

2 open source packages ship an affected version, including golang and stdlib. It affects 1 product.

PackageAffectedFixed in
golang BitnamiAll versions1.24.11, 1.25.5
stdlib GoAll versions1.24.11, 1.25.5
Linux distribution packages (38)
golang-docs AlmaLinux:10All versions1.25.5-1.el10_1.alma.1
golang-misc AlmaLinux:10All versions1.25.5-1.el10_1.alma.1
golang-src AlmaLinux:10All versions1.25.5-1.el10_1.alma.1
golang-tests AlmaLinux:10All versions1.25.5-1.el10_1.alma.1
ipp-usb AlmaLinux:10All versions0.9.27-4.el10_1
opentelemetry-collector AlmaLinux:10All versions0.135.0-3.el10_1
delve AlmaLinux:8All versions1.25.2-1.module_el8.10.0+4074+24330916
git-lfs AlmaLinux:8All versions3.4.1-7.el8_10
go-toolset AlmaLinux:8All versions1.25.5-1.module_el8.10.0+4107+b32a33ce
golang AlmaLinux:8All versions1.25.5-1.module_el8.10.0+4107+b32a33ce
golang-bin AlmaLinux:8All versions1.25.5-1.module_el8.10.0+4107+b32a33ce
golang-docs AlmaLinux:8All versions1.25.5-1.module_el8.10.0+4107+b32a33ce
golang-misc AlmaLinux:8All versions1.25.5-1.module_el8.10.0+4107+b32a33ce
golang-race AlmaLinux:8All versions1.25.5-1.module_el8.10.0+4107+b32a33ce
golang-src AlmaLinux:8All versions1.25.5-1.module_el8.10.0+4107+b32a33ce
golang-tests AlmaLinux:8All versions1.25.5-1.module_el8.10.0+4107+b32a33ce
grafana AlmaLinux:8All versions9.2.10-27.el8_10
grafana-pcp AlmaLinux:8All versions5.1.1-11.el8_10
grafana-selinux AlmaLinux:8All versions9.2.10-27.el8_10
osbuild-composer AlmaLinux:8All versions101.4-3.el8_10.alma.1
osbuild-composer-core AlmaLinux:8All versions101.4-3.el8_10.alma.1
osbuild-composer-worker AlmaLinux:8All versions101.4-3.el8_10.alma.1
go-toolset AlmaLinux:9All versions1.25.5-2.el9_7
golang AlmaLinux:9All versions1.25.5-2.el9_7
golang-bin AlmaLinux:9All versions1.25.5-2.el9_7
golang-docs AlmaLinux:9All versions1.25.5-2.el9_7
golang-misc AlmaLinux:9All versions1.25.5-2.el9_7
golang-race AlmaLinux:9All versions1.25.5-2.el9_7
golang-src AlmaLinux:9All versions1.25.5-2.el9_7
golang-tests AlmaLinux:9All versions1.25.5-2.el9_7
opentelemetry-collector AlmaLinux:9All versions0.135.0-3.el9_7
go-toolset Red Hat:enterprise_linux:10.1All versions0:1.25.5-1.el10_1
golang Red Hat:enterprise_linux:10.1All versions0:1.25.5-1.el10_1
golang-bin Red Hat:enterprise_linux:10.1All versions0:1.25.5-1.el10_1
golang-docs Red Hat:enterprise_linux:10.1All versions0:1.25.5-1.el10_1
golang-misc Red Hat:enterprise_linux:10.1All versions0:1.25.5-1.el10_1
golang-race Red Hat:enterprise_linux:10.1All versions0:1.25.5-1.el10_1
golang-src Red Hat:enterprise_linux:10.1All versions0:1.25.5-1.el10_1

Products include Golang Go.

How do I fix CVE-2025-61729?

Upgrade golang to a fixed version for your release line: 1.24.11 or 1.25.5.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2025-61729 being exploited?

There is no known exploitation of CVE-2025-61729 in the wild and no public exploit code.

All Golang Go vulnerabilities

Sources

Also known as ALSA-2026:0921, ALSA-2026:0922, ALSA-2026:0923, ALSA-2026:1344, ALSA-2026:1518, ALSA-2026:1715 and 420 more.

Is CVE-2025-61729 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free