CVE-2020-0601: Certificate validation bypass on Windows in crypto/x509
Summary
CVE-2020-0601: Certificate validation bypass on Windows in crypto/x509. Affects stdlib across 2 version ranges.
< 1.12.16
>= 1.13.0-0, < 1.13.7
Fixed in 1.12.16 or 1.13.7, depending on the release line you run. How to fix ↓
Also tracked for
- golang · Bitnami
The same CVE-2020-0601 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The crypto/x509 package is a part of the Go standard library and provides functionality for working with X.509 certificates. It is used for certificate parsing, verification, and validation. The package is widely used in Go applications for secure communication and authentication.
Vulnerability Detail
A vulnerability has been discovered in the crypto/x509 package on Windows systems. This vulnerability allows attackers to spoof valid certificate chains when the system root store is in use. This means that an attacker could create a malicious certificate that appears to be valid and trusted by the system, leading to potential man-in-the-middle attacks or other security breaches. The vulnerability is tracked as CVE-2020-0601.
How To Fix
Latest published version: go1.25.5 as of 22 Oct 2026
go get stdlib@vgo1.25.5
Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.
If you can't move to the latest
The minimum fixed version depends on the release line you run.
-
< 1.12.161.12.16go get stdlib@v1.12.16 -
>= 1.13.0-0, < 1.13.71.13.7go get stdlib@v1.13.7
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
In addition to the recommended fix, a workaround is available for affected users. The workaround involves modifying the code that uses the crypto/x509 package on Windows systems. Specifically, the 'Certificate.systemVerify' function should be replaced with a custom implementation that performs additional validation checks to ensure the integrity of the certificate chain. Here is an example of how the workaround can be implemented:
import (
"crypto/x509"
"crypto/x509/pkix"
"errors"
)
func customVerify(cert *x509.Certificate, intermediates *x509.CertPool, opts x509.VerifyOptions) (chains [][]*x509.Certificate, err error) {
// Perform additional validation checks here
// ...
// Call the original systemVerify function
return cert.systemVerify(intermediates, opts)
}
By using this custom implementation, the certificate validation process can be strengthened to mitigate the impact of the vulnerability.
Conclusion
In conclusion, the crypto/x509 package in Go is vulnerable to a certificate validation bypass on Windows systems. To mitigate the risk, it is crucial to install the Windows security update provided by Microsoft and update the Go installation to the recommended versions. Additionally, a workaround is available for affected users to strengthen the certificate validation process. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for stdlib →
FAQ
This vulnerability allows attackers to spoof valid certificate chains on Windows systems. This can lead to potential man-in-the-middle attacks or other security breaches.
Go versions prior to 1.12.6 and 1.13.7 are affected by this vulnerability. It is recommended to update to these versions or later.
Yes, a workaround is available. It involves replacing the 'Certificate.systemVerify' function with a custom implementation that performs additional validation checks.
More information about the Windows vulnerability can be found at the following URL: https://msrc.microsoft.com/update-guide/en-US/vulnerability/CVE-2020-0601
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities without requiring access to the code or installation.
References
Related vulnerabilities
Recent vulnerabilities recorded for stdlib.