CVE-2019-17596: Panic on invalid DSA public keys in crypto/dsa
Summary
CVE-2019-17596: Panic on invalid DSA public keys in crypto/dsa. Affects stdlib across 2 version ranges.
< 1.12.11
>= 1.13.0-0, < 1.13.2
Fixed in 1.12.11 or 1.13.2, depending on the release line you run. How to fix ↓
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/dsa package in the Go standard library provides support for the Digital Signature Algorithm (DSA). DSA is a widely used cryptographic algorithm for generating and verifying digital signatures. The package includes functions for key generation, signing, and verification using DSA. However, a vulnerability has been discovered in the package that can lead to a panic when processing invalid DSA public keys. This vulnerability affects versions 0.0.0 to 1.12.11 and 1.13.0-0 to 1.13.2 of the Go standard library.
Vulnerability Detail
The vulnerability arises when invalid DSA public keys are used, causing a panic in the dsa.Verify function. This can be triggered by passing a crafted X.509 certificate chain to the crypto/x509.Verify function, even if the certificates do not chain to a trusted root. The issue can be exploited by delivering the malicious chain via a crypto/tls connection to a client or to a server that accepts and verifies client certificates. This can result in a crash of net/http clients when connecting to an HTTPS server. However, net/http servers that accept client certificates will recover from the panic and are unaffected. Additionally, other scenarios where the vulnerability can be triggered include invoking the CheckSignature function on an X.509 certificate request, parsing a golang.org/x/crypto/openpgp Entity, or during a golang.org/x/crypto/otr conversation. Furthermore, a golang.org/x/crypto/ssh client can panic due to a malformed host key, while a server could panic if either the PublicKeyCallback function accepts a malformed public key or if the IsUserAuthority function accepts a certificate with a malformed public key.
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.111.12.11go get stdlib@v1.12.11 -
>= 1.13.0-0, < 1.13.21.13.2go get stdlib@v1.13.2
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
There is no known workaround for this vulnerability. It is recommended to apply the fix by updating to a patched version of the Go standard library.
Conclusion
The vulnerability in the crypto/dsa package of the Go standard library allows for panics to occur when processing invalid DSA public keys. This can be exploited in various scenarios, potentially leading to crashes or panics in affected applications. To mitigate the risk, it is crucial to update to a fixed version of the Go standard library, specifically versions 1.12.11 or 1.13.2. For further assistance with vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for stdlib →
FAQ
Versions 0.0.0 to 1.12.11 and 1.13.0-0 to 1.13.2 of the Go standard library are affected.
The vulnerability can be exploited by delivering a crafted X.509 certificate chain to the crypto/x509.Verify function, either via a crypto/tls connection to a client or to a server that accepts and verifies client certificates.
The vulnerability can lead to a panic in various scenarios, including crashes of net/http clients connecting to HTTPS servers, crashes of golang.org/x/crypto/ssh clients due to malformed host keys, and panics in functions such as CheckSignature, parsing of golang.org/x/crypto/openpgp Entities, and golang.org/x/crypto/otr conversations.
Net/http servers that accept client certificates are unaffected by this vulnerability and will recover from the panic.
There is no known workaround for this vulnerability. It is recommended to update to a patched version of the Go standard library.
References
Related vulnerabilities
Recent vulnerabilities recorded for stdlib.