Advisory

GO-2025-4155

Also known as: BIT-golang-2025-61729, CVE-2025-61729

Summary

Excessive resource consumption when printing error string for host certificate validation in crypto/x509

Details

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.

Severity

Not rated by the source.

Dates

Published
2025-12-02 18:30 UTC
Modified
2026-11-14 13:12 UTC

Affected packages and fixes

stdlib

Go · All systems

Affected

  • introduced 0, fixed 1.24.11, introduced 1.25.0, fixed 1.25.5 (semver)

Fixed versions

1.24.11, 1.25.5

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: Go Vulnerability Database · CC BY 4.0

Sources & licences