Panic in Certificate Verification in golang

golang Updated 02 Oct 2025

Summary

12/03/2024
Yes i
Medium
Not published

CVE-2024-24783: Verify panics on certificates with an unknown public key algorithm in crypto/x509. Affects golang across 2 version ranges.

< 1.21.8 >= 1.22.0-0, < 1.22.1

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

Also tracked for

The same CVE-2024-24783 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

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

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 for developing network applications, including secure communication protocols. However, a vulnerability has been discovered in the golang package that affects the certificate verification process in crypto/tls clients and servers. This vulnerability can lead to a panic condition, potentially causing denial of service or other security issues.

Vulnerability Detail

The vulnerability arises when a certificate chain contains a certificate with an unknown public key algorithm. When the Certificate.Verify function is called to verify the chain, it triggers a panic, resulting in the termination of the program. This vulnerability affects all crypto/tls clients and servers that set Config.ClientAuth to VerifyClientCertIfGiven or RequireAndVerifyClientCert. By default, TLS servers do not verify client certificates, but if this configuration is enabled, the vulnerability can be exploited. The impact of this vulnerability can range from service disruption to potential security breaches.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 1.21.8 1.21.8
  • >= 1.22.0-0, < 1.22.1 1.22.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 to the latest version is not immediately feasible, a possible workaround is to disable client certificate verification by setting Config.ClientAuth to NoClientCert. However, this workaround should be used with caution as it may compromise the security of the application. Here is an example of how to implement the workaround in code:

c := &tls.Config{
    ClientAuth: tls.NoClientCert,
}

Conclusion

The golang package is vulnerable to a certificate verification panic condition, which can lead to service disruption or security breaches. It is crucial to update to version 1.22.1 or later to fix this vulnerability. If immediate updating is not possible, disabling client certificate verification can serve as a temporary workaround. For further assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for golang →

Share this vulnerability

FAQ

The vulnerability affects all versions of the golang package prior to version 1.22.1.

By default, TLS servers do not verify client certificates. This vulnerability only affects servers that have enabled client certificate verification by setting Config.ClientAuth to VerifyClientCertIfGiven or RequireAndVerifyClientCert.

The vulnerability can lead to a panic condition, causing denial of service or other security issues. It may also allow attackers to bypass client certificate verification and gain unauthorized access to the server.

Yes, the golang community has addressed this issue and provided a fix in version 1.22.1. It is recommended to update to the latest version to mitigate the vulnerability.

Yes, a possible workaround is to disable client certificate verification by setting Config.ClientAuth to NoClientCert. However, this workaround should be used with caution as it may compromise the security of the application.

Related vulnerabilities

Recent vulnerabilities recorded for golang.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 1.21.8 1.21.8
  • >= 1.22.0-0, < 1.22.1 1.22.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