CVE-2024-24783: Verify panics on certificates with an unknown public key algorithm in crypto/x509

stdlib Updated 02 Oct 2025

Summary

05/03/2024
Yes i
Unrated
Not published

CVE-2024-24783: Verify panics on certificates with an unknown public key algorithm in crypto/x509. Affects stdlib 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

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 stdlib package in the Go ecosystem provides a set of standard libraries for the Go programming language. One of the packages in stdlib is crypto/x509, which is responsible for parsing and verifying X.509 certificates. X.509 is a widely used standard for public key infrastructure and digital certificates. The crypto/x509 package allows applications to work with X.509 certificates, including verifying their authenticity and validity.

Vulnerability Detail

The vulnerability identified as CVE-2024-24783 affects the crypto/x509 package in the Go stdlib. When verifying a certificate chain that includes a certificate with an unknown public key algorithm, the Certificate.Verify function in crypto/x509 panics. This vulnerability impacts all crypto/tls clients and servers that set Config.ClientAuth to VerifyClientCertIfGiven or RequireAndVerifyClientCert. By default, TLS servers do not verify client certificates. The panic caused by this vulnerability can lead to denial of service (DoS) situations and potentially disrupt the functioning of affected applications.

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.21.8 1.21.8
    go get stdlib@v1.21.8
  • >= 1.22.0-0, < 1.22.1 1.22.1
    go get stdlib@v1.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

There is no specific workaround mentioned for this vulnerability. However, developers can consider implementing additional checks or validation steps in their applications to handle certificates with unknown public key algorithms gracefully. This could involve custom error handling or skipping the verification of certificates with unknown algorithms.

Conclusion

The vulnerability identified as CVE-2024-24783 in the crypto/x509 package of the Go stdlib can lead to denial of service situations and potential bypassing of certificate verification. To mitigate this vulnerability, it is crucial to update the Go installation to the recommended versions. Additionally, developers should consider implementing appropriate error handling and validation mechanisms to handle certificates with unknown public key algorithms gracefully. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for stdlib →

Share this vulnerability

FAQ

The vulnerability can lead to denial of service (DoS) situations and disrupt the functioning of affected applications. It may also allow attackers to bypass certificate verification if the panic causes the application to terminate unexpectedly.

This vulnerability affects all applications that use the crypto/tls package and set Config.ClientAuth to VerifyClientCertIfGiven or RequireAndVerifyClientCert. Applications that do not perform certificate verification are not directly affected.

At the time of this report, there are no known public exploits targeting this specific vulnerability. However, it is advisable to apply the recommended fixes to prevent any potential exploitation.

Yes, this vulnerability can be exploited remotely if an attacker can present a certificate with an unknown public key algorithm to the affected application's TLS server. This could be done by intercepting the TLS handshake or by compromising a trusted certificate authority.

For more detailed information about this vulnerability, including its technical details and affected versions, refer to the official vulnerability database entry at https://vuln.go.dev/ID/GO-2024-2598.json

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.21.8 1.21.8
    go get stdlib@v1.21.8
  • >= 1.22.0-0, < 1.22.1 1.22.1
    go get stdlib@v1.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