Unbounded memory consumption in golang.org/x/crypto/ssh
Description
SSH servers parsing GSSAPI authentication requests do not validate the number of mechanisms specified in the request, allowing an attacker to cause unbounded memory consumption.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
SSH servers using Go's crypto/ssh library fail to validate the number of GSSAPI mechanisms, enabling unbounded memory consumption.
Vulnerability
Description
CVE-2025-58181 is a denial-of-service vulnerability in SSH servers that parse GSSAPI authentication requests. The root cause is that the server does not validate the number of mechanisms specified in the request, allowing an attacker to craft a request with an arbitrarily large number of mechanisms, leading to unbounded memory consumption [1][4].
Exploitation
An attacker can exploit this vulnerability by sending a specially crafted GSSAPI authentication request to a vulnerable SSH server. No authentication is required, and the attack can be performed over the network. The server will attempt to allocate memory for each mechanism listed in the request, potentially exhausting available memory [2][4].
Impact
Successful exploitation results in a denial-of-service condition where the SSH server consumes excessive memory, potentially causing the server to crash or become unresponsive. This can disrupt legitimate SSH connections and services [1][4].
Mitigation
The vulnerability is fixed in golang.org/x/crypto version v0.45.0. Users should update their dependencies to this version or later. The Go security team has released patches and advisories [2][3][4].
AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
golang.org/x/cryptoGo | < 0.45.0 | 0.45.0 |
Affected products
1- golang.org/x/crypto/golang.org/x/crypto/sshv5Range: 0
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
6- github.com/advisories/GHSA-j5w8-q4qc-rx2xghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2025-58181ghsaADVISORY
- go.dev/cl/721961ghsaWEB
- go.dev/issue/76363ghsaWEB
- groups.google.com/g/golang-announce/c/w-oX3UxNcZAghsaWEB
- pkg.go.dev/vuln/GO-2025-4134ghsaWEB
News mentions
0No linked articles in our index yet.