CVE-2025-58188: Go stdlib crypto/x509 DSA Public Key Certificate Validation Panic

stdlib Updated 04 Nov 2025

Summary

29/10/2025
Yes i
Unrated
Not published

CVE-2025-58188: Panic when validating certificates with DSA public keys in crypto/x509. Affects stdlib across 2 version ranges.

< 1.24.8 >= 1.25.0, < 1.25.2

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

Also tracked for

The same CVE-2025-58188 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The Go standard library (stdlib) provides essential packages for building applications in the Go programming language. Among these, the crypto/x509 package is responsible for handling X.509 certificates, which are widely used for secure communications. This package allows developers to validate certificate chains, ensuring the authenticity and integrity of certificates. However, a vulnerability has been identified that affects the validation process when DSA public keys are involved, potentially leading to application crashes.

Vulnerability Detail

The vulnerability arises from the validation of certificate chains containing DSA public keys. During this process, an interface cast is performed that incorrectly assumes the presence of an Equal method. If this assumption fails, it can lead to a panic in the application, causing it to crash unexpectedly. This issue affects any program that validates arbitrary certificate chains, posing a significant risk to applications relying on secure communications.

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.24.8 1.24.8
    go get stdlib@v1.24.8
  • >= 1.25.0, < 1.25.2 1.25.2
    go get stdlib@v1.25.2

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

Workaround

As a temporary workaround, avoid using DSA public keys in your certificate chains until you can update to a patched version. This may involve using alternative key types such as RSA or ECDSA for your certificates.

Conclusion

The CVE-2025-58188 vulnerability in the Go standard library's crypto/x509 package poses a significant risk to applications that validate DSA public key certificates. It is crucial to update to the patched versions to mitigate this risk. Additionally, using alternative key types can serve as a temporary workaround until an update is feasible.

See every vulnerability recorded for stdlib →

Share this vulnerability

FAQ

CVE-2025-58188 is a vulnerability in the Go standard library's crypto/x509 package that can cause programs to panic when validating certificates with DSA public keys.

If your application validates certificate chains containing DSA public keys, it may crash unexpectedly due to this vulnerability.

The vulnerability affects Go versions prior to 1.24.8 and 1.25.0, specifically versions 1.23.3 and earlier.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without needing to sign up.

If an immediate update is not possible, consider using alternative key types for your certificates, such as RSA or ECDSA, to avoid the vulnerability.

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.24.8 1.24.8
    go get stdlib@v1.24.8
  • >= 1.25.0, < 1.25.2 1.25.2
    go get stdlib@v1.25.2

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