VDB
Sign up
HIGH7.5

GO-2025-4155

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

Quick fix

GO-2025-4155 — stdlib: upgrade to the fixed version with the command below.

go get stdlib@v1.24.11

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.

Are you affected?

Enter the version of the package you're using.

Affected packages

Go/stdlib
Introduced in: 0Fixed in: 1.24.11
Fixgo get stdlib@v1.24.11

References

Check it before you install it

One call answers whether to add this package: known advisories, CISA KEV, and whether the name is a hallucinated or freshly squatted one. No key needed to try it.

curl -s https://vdb.ai.kr/v1/ai/check-packages \
  -H 'Content-Type: application/json' \
  -d '{"packages":["pkg:golang/stdlib"]}'