CVE-2022-41724: Panic on large handshake records in crypto/tls

stdlib Updated 02 Oct 2025

Summary

16/02/2023
Yes i
Unrated
Not published

CVE-2022-41724: Panic on large handshake records in crypto/tls. Affects stdlib across 2 version ranges.

< 1.19.6 >= 1.20.0-0, < 1.20.1

Fixed in 1.19.6 or 1.20.1, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2022-41724 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 crypto/tls package in Go provides a secure transport layer for network connections using the Transport Layer Security (TLS) protocol. It is a part of the standard library in Go and is widely used for implementing secure communication in Go applications. However, a vulnerability has been discovered in the package that can lead to panics when processing large TLS handshake records. This vulnerability affects all TLS 1.3 clients, TLS 1.2 clients with session resumption enabled, and TLS 1.3 servers requesting client certificates.

Vulnerability Detail

The vulnerability arises when clients or servers send large TLS handshake records, causing the receiving party to panic while constructing responses. This can be triggered by both clients and servers, leading to potential denial-of-service (DoS) scenarios. Clients using TLS 1.3 or TLS 1.2 with session resumption enabled are affected, as well as TLS 1.3 servers requesting client certificates. The panic occurs during the construction of responses, which can disrupt the normal functioning of the affected application.

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.6 1.19.6
    go get stdlib@v1.19.6
  • >= 1.20.0-0, < 1.20.1 1.20.1
    go get stdlib@v1.20.1

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

If updating the Go standard library is not immediately feasible, a possible workaround is to limit the size of the TLS handshake records. This can be achieved by configuring the application to reject or truncate excessively large handshake records. However, this workaround may impact the compatibility and functionality of the application, so updating to the fixed versions of the standard library is the recommended approach.

Conclusion

The panic on large handshake records vulnerability in the crypto/tls package can lead to denial-of-service scenarios and disrupt the normal functioning of affected applications. It is crucial to update the Go standard library to the fixed versions to mitigate this vulnerability. Regularly updating the Go installation and using tools like Vulert can help ensure the security of Go applications. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for stdlib →

Share this vulnerability

FAQ

This vulnerability affects Go versions prior to 1.19.6 for TLS 1.2 clients and prior to 1.20.1 for TLS 1.3 clients and servers.

The vulnerability can lead to panics in the crypto/tls package, causing potential denial-of-service (DoS) scenarios and disrupting the normal functioning of affected applications.

Yes, all TLS 1.3 clients are affected by this vulnerability. It is recommended to update to the fixed version of the Go standard library.

A possible workaround is to limit the size of TLS handshake records, but this may impact compatibility and functionality. Updating to the fixed version of the Go standard library is the recommended approach.

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.

Related vulnerabilities

Recent vulnerabilities recorded for stdlib.

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.6 1.19.6
    go get stdlib@v1.19.6
  • >= 1.20.0-0, < 1.20.1 1.20.1
    go get stdlib@v1.20.1

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