ADVISORIES

Go Vulnerability Database

GO-2026-5020

Invoking infinite loop on large channel writes in golang.org/x/crypto/ssh

Details

When writing data larger than 4GB in a single Write call on an SSH channel, an integer overflow in the internal payload size calculation caused the write loop to spin indefinitely, sending empty packets without making progress. The size comparison now uses int64 to prevent truncation.

Affected packages

EcosystemPackageAffected versions
Gogolang.org/x/crypto
All versions before 0.52.0 (fixed in 0.52.0)

References