CVE-2026-39832: Google Go x/crypto SSH agent dropped constraint extensions

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

A vulnerability in the Go SSH agent library allows security restrictions on digital keys to be bypassed when they are forwarded to remote servers. This means that a key intended to be used only for specific destinations or under certain conditions could be used without any restrictions by a remote host. This could lead to unauthorized access to other systems if a remote server is compromised or untrustworthy.

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

Quick answers

Is CVE-2026-39832 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-39832 being exploited in the wild.
How severe is CVE-2026-39832?
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/agent (Go) < 0.52.0.
Is there a fix for CVE-2026-39832?
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-39832 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-39832?
Check whether you run golang.org/x/crypto (Go) or golang.org/x/crypto/ssh/agent (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

A vulnerability exists in the golang.org/x/crypto/ssh/agent package where constraint extensions, such as 'restrict-destination-v00@openssh.com', are not serialized during the key-adding process to a remote agent. This results in the silent stripping of these security constraints, allowing a forwarded key to be used without the intended restrictions on the remote host. The root cause is a failure in the serialization logic within the client.Add and keyring.Add functions. Attackers can exploit this to use keys in ways explicitly forbidden by the original security policy. The issue is fixed in version 0.52.0, which properly serializes all constraint extensions and ensures the in-memory keyring rejects keys with unsupported extensions.

Affected products

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

Identifiers

  • CVE-2026-39832
  • GHSA-f5wc-c3c7-36mc
  • GO-2026-5006

Timeline

  • 2026-05-16: disclosed: Issue reported to Go project
  • 2026-05-22: advisory: NVD and Go vulnerability report published
  • 2026-06-25: advisory: GitHub Advisory published

References

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