CVE-2026-39834: Go x/crypto infinite loop in SSH channel writes

CVE-2026-39834 · Severity: critical · CVSS 9.1 · Published 2026-05-22

A vulnerability in the Go SSH library can cause applications to enter an infinite loop when attempting to send large amounts of data (over 4GB) at once. This results in the application becoming unresponsive and consuming excessive system resources while failing to transmit the intended data. Organizations using Go-based SSH services or clients should update to prevent potential denial-of-service conditions.

Technologies: golang.org/x/crypto (Go), golang.org/x/crypto/ssh (Go). Vendors: Go.

Quick answers

Is CVE-2026-39834 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-39834 being exploited in the wild.
How severe is CVE-2026-39834?
Critical severity, with a CVSS score of 9.1, published 22 May 2026.
Which products and versions are affected?
golang.org/x/crypto (Go) SEMVER:introduced=0,fixed=0.52.0; golang.org/x/crypto/ssh (Go) < 0.52.0.
Is there a fix for CVE-2026-39834?
Yes. golang.org/x/crypto (Go): upgrade to 0.52.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-39834 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-39834?
Check whether you run golang.org/x/crypto (Go) or golang.org/x/crypto/ssh (Go) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • golang.org/x/crypto (Go): upgrade to 0.52.0 or later
    go get golang.org/x/crypto@v0.52.0

Technical details

An integer overflow exists in the internal payload size calculation of the golang.org/x/crypto/ssh package. When a single Write call on an SSH channel exceeds 4GB, the internal size comparison truncates the value, causing the write loop to spin indefinitely. During this state, the library sends empty packets without making progress, leading to a denial-of-service (DoS) condition. The vulnerability is triggered remotely if an attacker can influence the size of data being written to an SSH channel. The issue was resolved in version 0.52.0 by using int64 for size comparisons to prevent truncation.

Affected products

  • Go Project golang.org/x/crypto/ssh < 0.52.0

Identifiers

  • CVE-2026-39834
  • GHSA-rm3j-f69w-wqmq
  • GO-2026-5020

Timeline

  • 2026-05-21: disclosed: Reported by NCC Group Cryptography Services
  • 2026-05-22: advisory: NVD and Go Project published initial advisories
  • 2026-06-25: advisory: GitHub Advisory published

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.