Go standard library crypto/x509
Excessive resource consumption when printing error string for host certificate validation in crypto/x509
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.
First public PoC
None yetno public PoC found
Public PoCs00 on GitHub
CVSS7.5high · scored by CISA ADP · CWE-400
CISA KEV
Not listednot known exploited
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
Go standard library crypto/x509
- < 1.24.11
- >= 1.25.0, < 1.25.5
Fixed in 1.24.11, 1.25.5
Mitigation
Upgrade crypto/x509 to 1.24.11 or 1.25.5 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.