Executive brief
A vulnerability in the Go SSH library could allow a remote attacker to crash a server by sending specially crafted network packets. This library is commonly used to build secure communication tools and remote access services. An exploit would result in a denial-of-service, making the affected service unavailable to legitimate users.
Technical details
A vulnerability exists in the golang.org/x/crypto/ssh package due to an incorrectly placed type cast from bytes to int within the AES-GCM packet decoder. This flaw leads to an integer underflow during byte arithmetic, resulting in a runtime panic. A remote, unauthenticated attacker can exploit this by sending a well-crafted SSH packet to a server or client using the affected library. The issue impacts several functions including NewServerConn, NewClientConn, and Dial. The vulnerability is addressed in version 0.52.0 of the package.
Affected products
- Go golang.org/x/crypto/ssh < 0.52.0
Timeline
- 2026-05-21: disclosed: Issue reported to Go maintainers
- 2026-05-22: advisory: NVD and Go Vulnerability Database entries published
- 2026-06-25: patched: GitHub Advisory published for version 0.52.0