crypto/x509: Improper Certificate Validation
CVE-2025-61729 is a high-severity improper certificate validation vulnerability in crypto/x509 from Go standard library, with a CVSS 3.1 base score of 7.5 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. The record lists versions 1.24.11, 1.25.5 as the first without the flaw, so updating crypto/x509 to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.49% chance of exploitation within 30 days, which is low compared with other CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update crypto/x509 to 1.24.11 or 1.25.5, whichever matches your release line, or a later version.
- Update Go to 1.24.11 or 1.25.5, whichever matches your release line, or a later version.
- Read the advisory on pkg.go.dev for workarounds and exact fixed builds.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Go standard library | crypto/x509 | before 1.24.11; 1.25.0 up to, but not including, 1.25.5 | 1.24.11, 1.25.5 |
| Go | Go | before 1.24.11; 1.25.0 up to, but not including, 1.25.5 | 1.24.11, 1.25.5 |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- NoneNo data is disclosed.
- Integrity
- NoneNothing can be modified.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H. Scored by CISA (ADP).
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.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Improper Certificate Validation
The product does not validate, or incorrectly validates, a certificate.
How developers prevent this class of flaw
- Certificates should be carefully managed and checked to assure that data are encrypted with the intended owner's public key.
- If certificate pinning is being used, ensure that all relevant properties of the certificate are fully validated before the certificate is pinned, including the hostname.
More Improper Certificate Validation vulnerabilities (CWE-295)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Advisories
Patches and release notes
- go.dev/cl/725920
- go.dev/issue/76445Issue Tracking
- groups.google.com/g/golang-announce/c/8FJoBkPddm4Mailing List, Release Notes
Other vulnerabilities in crypto/x509
- 7.5 High severity
- 8.2 High severity
- 7.5 High severity
- 7.5 High severity
- 7.5 High severity
- 7.5 High severity
Recent Improper Certificate Validation vulnerabilities
- 8.3 High severity
- 7.5 High severity
- 7.5 High severity
- 7.5 High severity
- 9.1 Critical severity
- 8.6 High severity
Spotted an error? Tell us.