CVE-2025-58189: Go stdlib - ALPN Negotiation Error Exposes Attacker Controlled Information

stdlib Updated 04 Nov 2025

Summary

29/10/2025
Yes i
Unrated
Not published

CVE-2025-58189: ALPN negotiation error contains attacker controlled information in crypto/tls. 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-58189 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. It includes various functionalities such as networking, cryptography, and data manipulation. The 'crypto/tls' package specifically handles Transport Layer Security (TLS) connections, ensuring secure communication over networks. However, it is susceptible to a vulnerability during the Application-Layer Protocol Negotiation (ALPN) process, which can expose sensitive information.

Vulnerability Detail

The vulnerability arises when the Conn.Handshake method fails during ALPN negotiation. In such cases, the error message generated contains information controlled by the attacker, specifically the ALPN protocols sent by the client. This unescaped information can potentially be exploited to gain insights into the client's behavior or to facilitate further attacks, compromising the security of the TLS connection.

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, developers can implement additional error handling to sanitize or limit the information returned during the handshake failure. This can be done by wrapping the handshake function and controlling the output of error messages.

Conclusion

CVE-2025-58189 is a significant vulnerability in the Go standard library's TLS implementation that exposes attacker-controlled information during ALPN negotiation failures. Users are strongly advised to update to the latest patched versions to ensure the security of their applications.

See every vulnerability recorded for stdlib →

Share this vulnerability

FAQ

The impact includes potential exposure of sensitive information controlled by the attacker, which could lead to further exploitation of the application.

You can check if your application is affected by using the Vulert playground at Vulert Scanner, which allows you to monitor for open-source vulnerabilities without needing to sign up.

Versions prior to 1.24.8 and 1.25.0 (up to 1.25.1) are affected by this vulnerability.

While updating is the best solution, implementing stricter error handling can help mitigate the risk temporarily.

The vulnerability was credited to the National Cyber Security Centre Finland.

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