Insecure RSA Key Exchange in golang

golang Updated 02 Oct 2025

Summary

06/03/2024
Yes i
High
Not published

CVE-2023-45287: Before Go 1.20, the RSA based key exchange methods in crypto/tls may exhibit a timing side channel. Affects golang versions < 1.20.0. Fixed in 1.20.0. How to fix ↓

Also tracked for

The same CVE-2023-45287 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 Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The golang package is a popular open-source programming language that provides a robust set of tools and libraries for building scalable and efficient applications. It is widely used in various domains, including web development, network programming, and system administration. However, prior to version 1.20, the RSA-based TLS key exchanges in golang utilized the math/big library, which was not constant time. Although RSA blinding was implemented to mitigate timing attacks, further analysis revealed potential timing side channels that could leak session key bits. To address this issue, the crypto/tls library in golang 1.20 introduced a fully constant time RSA implementation.

Vulnerability Detail

The vulnerability in golang's RSA key exchange arises from the potential timing side channels that may leak session key bits. The removal of PKCS#1 padding in the previous implementation could inadvertently expose timing information, enabling an attacker to recover sensitive data. This vulnerability poses a high risk as it could compromise the confidentiality of encrypted communications. It is important to note that this vulnerability affects golang versions prior to 1.20.

How To Fix

Minimum fixed version

1.20.0

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is essential to update to the fixed version of golang to address the issue.

Conclusion

The insecure RSA key exchange vulnerability in golang versions prior to 1.20 poses a significant risk to the confidentiality of encrypted communications. It is crucial for developers to update their golang package to version 1.20.0 or later to mitigate this vulnerability. For further assistance or support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for golang →

Share this vulnerability

FAQ

You can check the version of golang installed on your system by running the following command: 'go version'. This will display the installed golang version.

No, this vulnerability specifically affects the RSA key exchange implementation in golang versions prior to 1.20. If your application does not utilize this specific functionality, it is not affected by this vulnerability.

It is not recommended to manually patch the vulnerable code in golang. Instead, it is advised to update to the fixed version (1.20.0 or later) that includes the necessary security enhancements.

At the time of this report, there are no known exploits specifically targeting this vulnerability. However, it is crucial to update to the fixed version to prevent potential future attacks.

You can find more information about this vulnerability in the official golang security advisory or by referring to the provided vulnerability details in the Open Source Vulnerability format.

Related vulnerabilities

Recent vulnerabilities recorded for golang.

How To Fix

Minimum fixed version

1.20.0

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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