CVE-2023-29409: Large RSA keys can cause high CPU usage in crypto/tls

stdlib Updated 02 Oct 2025

Summary

02/08/2023
Yes i
Unrated
Not published

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

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.

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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.12 1.19.12
    go get stdlib@v1.19.12
  • >= 1.20.0-0, < 1.20.7 1.20.7
    go get stdlib@v1.20.7
  • >= 1.21.0-0, < 1.21.0-rc.4 1.21.0-rc.4
    go 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 →

Share this vulnerability

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.

Related vulnerabilities

Recent vulnerabilities recorded for stdlib.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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.12 1.19.12
    go get stdlib@v1.19.12
  • >= 1.20.0-0, < 1.20.7 1.20.7
    go get stdlib@v1.20.7
  • >= 1.21.0-0, < 1.21.0-rc.4 1.21.0-rc.4
    go 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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback