crypto/x509: Improper Certificate Validation
CVE-2025-58188 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.8, 1.25.2 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.38% 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.8 or 1.25.2, whichever matches your release line, or a later version.
- Update Go to 1.24.8 or 1.25.2, 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.8; 1.25.0 up to, but not including, 1.25.2 | 1.24.8, 1.25.2 |
| Go | Go | before 1.24.8; 1.25.0 up to, but not including, 1.25.2 | 1.24.8, 1.25.2 |
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
Validating certificate chains which contain DSA public keys can cause programs to panic, due to a interface cast that assumes they implement the Equal method. This affects programs which validate arbitrary certificate chains.
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: yes, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Advisories
Patches and release notes
- go.dev/cl/709853
- groups.google.com/g/golang-announce/c/4Emdl2iQ_bIMailing List, Release Notes
- openwall.com/lists/oss-security/2025/10/08/1Mailing List, Release Notes
Other references
- go.dev/issue/75675Issue Tracking
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.8 High severity
- 7.4 High severity
- 7.5 High severity
- 7.8 High severity
- 8.1 High severity
- 9.3 Critical severity
Spotted an error? Tell us.