Description
When adding a key to a remote agent constraint extensions such as restrict-destination-v00@openssh.com were not serialized in the request. Destination restrictions were silently stripped when forwarding keys, allowing unrestricted use of the key on the remote host. The client now serializes all constraint extensions. Additionally, the in-memory keyring returned by NewKeyring() now rejects keys with unsupported constraint extensions instead of silently ignoring them.
Published: 2026-05-22
Score: 9.1 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

When a key that contains constraint extensions such as restrict-destination-v00@openssh.com is added to a remote ssh agent, the agent omitted these constraints during serialization. As a result, forwarded keys were stripped of all destination restrictions, allowing anyone who could forward a key to use it anywhere on the remote host without limitation. The vulnerability therefore enables an attacker who can forward an SSH key to abuse it beyond the intended constraints, potentially accessing services or executing commands on the remote system. The CVSS score of 9.1 reflects its high severity, indicating significant risk to confidentiality, integrity, and availability when keys can be used unrestrictedly.

Affected Systems

The vulnerability affects the golang.org/x/crypto/ssh/agent component of the Go cryptographic library. No specific version numbers were listed, so any build of the agent prior to the fix that does not enforce constraint serialization may be vulnerable.

Risk and Exploitability

The EPSS score of < 1% indicates a very low probability of exploitation, and the vulnerability is not listed in the CISA KEV catalog. The CVSS score of 9.1 reflects its high severity and indicates potential for widespread damage. The attack requires the ability to forward an SSH key via ssh-agent, which can be achieved by a local user or a process with agent access. Because the flaw silently removes all constraint extensions, the attack vector is straightforward for anyone who can trigger key forwarding. The fix now serializes all constraint extensions and rejects unsupported ones, greatly reducing the potential exploitation window.

Generated by OpenCVE AI on May 28, 2026 at 19:39 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade golang.org/x/crypto to the latest release that includes the fixed key serialization and constraint rejection logic
  • Re‑configure your SSH deployment to disable key forwarding or to use Restrict mode explicitly
  • Audit existing scripts or applications that invoke ssh-agent to ensure they do not forward keys without proper constraints

Generated by OpenCVE AI on May 28, 2026 at 19:39 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 28 May 2026 18:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-290

Thu, 28 May 2026 15:15:00 +0000

Type Values Removed Values Added
First Time appeared Golang crypto
Weaknesses CWE-502
CPEs cpe:2.3:a:golang:crypto:*:*:*:*:*:go:*:*
Vendors & Products Golang crypto

Fri, 22 May 2026 19:30:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 9.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Fri, 22 May 2026 13:15:00 +0000

Type Values Removed Values Added
First Time appeared Golang
Golang ssh
Vendors & Products Golang
Golang ssh

Fri, 22 May 2026 04:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-290

Fri, 22 May 2026 03:30:00 +0000

Type Values Removed Values Added
Description When adding a key to a remote agent constraint extensions such as restrict-destination-v00@openssh.com were not serialized in the request. Destination restrictions were silently stripped when forwarding keys, allowing unrestricted use of the key on the remote host. The client now serializes all constraint extensions. Additionally, the in-memory keyring returned by NewKeyring() now rejects keys with unsupported constraint extensions instead of silently ignoring them.
Title Invoking agent constraints dropped when forwarding keys in golang.org/x/crypto/ssh/agent
References

cve-icon MITRE

Status: PUBLISHED

Assigner: Go

Published:

Updated: 2026-05-22T19:03:06.882Z

Reserved: 2026-04-07T18:13:03.529Z

Link: CVE-2026-39832

cve-icon Vulnrichment

Updated: 2026-05-22T19:02:08.967Z

cve-icon NVD

Status : Analyzed

Published: 2026-05-22T04:16:22.663

Modified: 2026-05-28T15:11:29.110

Link: CVE-2026-39832

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-28T19:45:25Z

Weaknesses
  • CWE-502

    Deserialization of Untrusted Data