Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-39830

CVE-2026-39830: SSH Connection DoS Vulnerability

CVE-2026-39830 is a denial of service vulnerability in SSH connections where malicious peers send unsolicited responses to block connection loops. This post covers technical details, affected systems, and mitigation steps.

Published:

CVE-2026-39830 Overview

CVE-2026-39830 is a denial of service vulnerability in the Go golang.org/x/crypto/ssh package. A malicious SSH peer can send unsolicited global request responses that fill an internal buffer and block the connection's read loop. The blocked goroutine cannot be released by calling Close(), producing a resource leak on every affected connection. Repeated abuse exhausts memory and goroutines on the victim host. The Go security team tracks this issue as GO-2026-5017, and the fix discards unsolicited global responses rather than queueing them.

Critical Impact

An unauthenticated network attacker acting as an SSH peer can leak goroutines and memory per connection, leading to resource exhaustion and denial of service against Go-based SSH clients and servers.

Affected Products

  • Go golang.org/x/crypto/ssh package versions prior to the fix referenced in GO-2026-5017
  • Go-based SSH servers and clients built on golang.org/x/crypto/ssh
  • Downstream applications and tooling that embed the vulnerable SSH library

Discovery Timeline

  • 2026-05-22 - CVE-2026-39830 published to NVD
  • 2026-05-22 - Last updated in NVD database

Technical Details for CVE-2026-39830

Vulnerability Analysis

The flaw lives in the SSH transport layer of golang.org/x/crypto/ssh. The connection's read loop dispatches incoming packets, including responses to global requests, into an internal channel. When a peer sends global request response messages that were never solicited, those messages still get enqueued. The bounded channel fills, the read loop blocks on the send, and no consumer ever drains the buffer because no request is pending. The connection becomes wedged in a state that Close() cannot unwind, since the goroutine is parked on a channel send rather than waiting on the connection context. Each abusive session adds another stuck goroutine and the memory it references, producing a cumulative resource leak.

Root Cause

The library accepted and queued global request responses without verifying that a matching request was outstanding. Combined with a bounded internal buffer and a read loop that blocks on send, the design allowed a remote peer to drive the process into an unrecoverable state. The patch resolves this by discarding any global response that does not correspond to a pending request.

Attack Vector

Exploitation requires only network reachability and the ability to complete enough of the SSH protocol to send SSH_MSG_REQUEST_SUCCESS or SSH_MSG_REQUEST_FAILURE messages. No credentials or user interaction are needed. The attacker repeatedly opens SSH sessions and sends a stream of unsolicited global responses on each one, leaving behind a leaked goroutine after every connection. Sustained activity exhausts memory and scheduler resources on the target. See the Go.dev Vulnerability Advisory for protocol-level details.

Detection Methods for CVE-2026-39830

Indicators of Compromise

  • Steadily increasing goroutine counts in Go SSH server or client processes that do not return to baseline after connections close
  • Growing resident memory in long-running Go SSH services without a corresponding rise in active sessions
  • Repeated short-lived SSH connections from the same source followed by abnormal process resource growth

Detection Strategies

  • Instrument Go SSH services with runtime.NumGoroutine() and pprof endpoints, then alert on sustained upward trends.
  • Inspect SSH protocol traces for SSH_MSG_REQUEST_SUCCESS or SSH_MSG_REQUEST_FAILURE packets sent without a preceding SSH_MSG_GLOBAL_REQUEST from the victim.
  • Correlate connection logs with process metrics to identify peers that consistently precede resource growth.

Monitoring Recommendations

  • Track memory, goroutine, and file descriptor counts for any service linking golang.org/x/crypto/ssh and alert on monotonic growth.
  • Rate-limit and log SSH connections from untrusted networks, retaining source IP, session duration, and byte counts.
  • Enable Go runtime metrics export to a centralized monitoring system to baseline normal behavior across deployments.

How to Mitigate CVE-2026-39830

Immediate Actions Required

  • Upgrade golang.org/x/crypto to the fixed version referenced in GO-2026-5017 and rebuild all affected binaries.
  • Inventory internal services that import golang.org/x/crypto/ssh, including indirect dependencies surfaced by go mod graph.
  • Restart long-running Go SSH processes after patching to release any goroutines already leaked.

Patch Information

The Go team published the fix through change lists CL 781640 and CL 781664, tracked under Go issue 79564 and announced on the golang-announce mailing list. The corrected behavior discards unsolicited global request responses instead of buffering them. Consumers must update their go.mod to the patched golang.org/x/crypto release and recompile.

Workarounds

  • Restrict network exposure of Go-based SSH endpoints to trusted source ranges using firewall or security group rules.
  • Place affected services behind an SSH-aware proxy or bastion that terminates and re-establishes sessions, preventing direct peer reachability.
  • Apply aggressive idle and total-session timeouts so leaked goroutines are bounded by process lifetime until patching completes.
bash
# Update the vulnerable module to the patched release
go get golang.org/x/crypto@latest
go mod tidy
go build ./...

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.