CVE-2023-29409: Large RSA keys can cause high CPU usage in crypto/tls
Summary
CVE-2023-29409: Large RSA keys can cause high CPU usage in crypto/tls. Affects stdlib across 3 version ranges.
< 1.19.12
>= 1.20.0-0, < 1.20.7
>= 1.21.0-0, < 1.21.0-rc.4
Fixed in 1.19.12, 1.20.7 or 1.21.0-rc.4, depending on the release line you run. How to fix ↓
Also tracked for
- golang · Bitnami
- golang-1.15 · Debian:11
The same CVE-2023-29409 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 stdlib package in Go is a collection of standard libraries that provide fundamental functionality for Go programs. It includes various modules for different purposes, such as networking, cryptography, and file handling. The crypto/tls module within the stdlib package is responsible for providing secure communication over the network using the Transport Layer Security (TLS) protocol. It allows Go programs to establish encrypted connections with remote servers.
However, a vulnerability has been identified in the crypto/tls module that can cause high CPU usage when dealing with extremely large RSA keys in certificate chains. This can lead to significant performance degradation and resource exhaustion on the client/server side.
To address this issue, a fix has been implemented that restricts the size of RSA keys transmitted during handshakes to a maximum of 8192 bits. This limitation helps prevent excessive CPU usage and ensures the default safety of users of crypto/tls.
Vulnerability Detail
The vulnerability arises from the processing of RSA keys during handshakes in the crypto/tls module. When a client/server establishes a TLS connection, it verifies the signatures of the certificates in the chain. If the chain contains certificates with extremely large RSA keys, the verification process can consume a significant amount of CPU time.
The fix for this vulnerability limits the size of RSA keys transmitted during handshakes to a maximum of 8192 bits. This restriction ensures that the verification process does not cause excessive CPU usage.
It is worth noting that based on a survey of publicly trusted RSA keys, there are currently only three certificates in circulation with keys larger than 8192 bits. However, these certificates appear to be test certificates that are not actively deployed. While there may be larger keys in use in private PKIs, the focus of the fix is on the web PKI to enhance the default safety of users of crypto/tls.
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.19.121.19.12go get stdlib@v1.19.12 -
>= 1.20.0-0, < 1.20.71.20.7go get stdlib@v1.20.7 -
>= 1.21.0-0, < 1.21.0-rc.41.21.0-rc.4go get stdlib@v1.21.0-rc.4
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 specific workaround mentioned for this vulnerability. However, users can ensure they are not using RSA keys larger than 8192 bits in their certificate chains to avoid the potential high CPU usage issue.
Conclusion
The vulnerability in the crypto/tls module of the Go stdlib package can cause high CPU usage when dealing with extremely large RSA keys in certificate chains. To mitigate this issue, it is recommended to update the package to the fixed versions mentioned. Users should ensure they are not using RSA keys larger than 8192 bits in their certificate chains. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for stdlib →
FAQ
The vulnerability can cause high CPU usage on both the client and server sides when dealing with extremely large RSA keys in certificate chains. This can lead to performance degradation and resource exhaustion.
Based on a survey of publicly trusted RSA keys, there are currently only three certificates in circulation with keys larger than 8192 bits. However, these certificates appear to be test certificates and not actively deployed.
While the fix primarily targets the web PKI, there may be larger keys in use in private PKIs. However, the focus is on enhancing the default safety of users of crypto/tls in the web PKI.
To fix this vulnerability, update the Go stdlib package to version 1.19.12, 1.20.7, or 1.21.0-rc.4 or later. These versions include the fix that restricts the size of RSA keys transmitted during handshakes.
There is no specific workaround mentioned for this vulnerability. However, users can ensure they are not using RSA keys larger than 8192 bits in their certificate chains to avoid the potential high CPU usage issue.
References
Related vulnerabilities
Recent vulnerabilities recorded for stdlib.