CVE-2026-39832

Invoking agent constraints dropped when forwarding keys in golang.org/x/crypto/ssh/agent

Published May 22, 2026 CVSS 3.1 · 9.1 Critical EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

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 August 13, 2026 at 23:36 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-f5wc-c3c7-36mc golang.org/x/crypto doesn't drop invoking agent constraints when forwarding keys
References
Link Providers
https://access.redhat.com/errata/RHSA-2026:35833 cve-icon
https://access.redhat.com/errata/RHSA-2026:36199 cve-icon
https://access.redhat.com/errata/RHSA-2026:36319 cve-icon
https://access.redhat.com/errata/RHSA-2026:36625 cve-icon
https://access.redhat.com/errata/RHSA-2026:36648 cve-icon
https://access.redhat.com/errata/RHSA-2026:36651 cve-icon
https://access.redhat.com/errata/RHSA-2026:36796 cve-icon
https://access.redhat.com/errata/RHSA-2026:36797 cve-icon
https://access.redhat.com/errata/RHSA-2026:37072 cve-icon
https://access.redhat.com/errata/RHSA-2026:37123 cve-icon
https://access.redhat.com/errata/RHSA-2026:37271 cve-icon
https://access.redhat.com/errata/RHSA-2026:37387 cve-icon
https://access.redhat.com/errata/RHSA-2026:37410 cve-icon
https://access.redhat.com/errata/RHSA-2026:40118 cve-icon
https://access.redhat.com/errata/RHSA-2026:40262 cve-icon
https://access.redhat.com/errata/RHSA-2026:40945 cve-icon
https://access.redhat.com/errata/RHSA-2026:40972 cve-icon
https://access.redhat.com/errata/RHSA-2026:41019 cve-icon
https://access.redhat.com/errata/RHSA-2026:41031 cve-icon
https://access.redhat.com/errata/RHSA-2026:41036 cve-icon
https://access.redhat.com/errata/RHSA-2026:41066 cve-icon
https://access.redhat.com/errata/RHSA-2026:42146 cve-icon
https://access.redhat.com/errata/RHSA-2026:42796 cve-icon
https://access.redhat.com/errata/RHSA-2026:43052 cve-icon
https://access.redhat.com/errata/RHSA-2026:43692 cve-icon
https://access.redhat.com/errata/RHSA-2026:49944 cve-icon
https://access.redhat.com/errata/RHSA-2026:52857 cve-icon
https://access.redhat.com/errata/RHSA-2026:52910 cve-icon
https://access.redhat.com/errata/RHSA-2026:57194 cve-icon
https://access.redhat.com/errata/RHSA-2026:59579 cve-icon
https://access.redhat.com/errata/RHSA-2026:61314 cve-icon
https://access.redhat.com/errata/RHSA-2026:66521 cve-icon
https://access.redhat.com/errata/RHSA-2026:67450 cve-icon
https://access.redhat.com/security/cve/CVE-2026-39832 cve-icon
https://bugzilla.redhat.com/show_bug.cgi?id=2480685 cve-icon
https://go.dev/cl/778640 cve-icon cve-icon
https://go.dev/cl/778641 cve-icon cve-icon
https://go.dev/issue/79435 cve-icon cve-icon
https://groups.google.com/g/golang-announce/c/a082jnz-LvI cve-icon cve-icon
https://pkg.go.dev/vuln/GO-2026-5006 cve-icon cve-icon
https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-39832.json cve-icon
History
Type Values Removed Values Added
Weaknesses CWE-290
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
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'}

Type Values Removed Values Added
First Time appeared Golang
Golang ssh
Vendors & Products Golang
Golang ssh
Type Values Removed Values Added
Weaknesses CWE-290
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
Weaknesses
  • CWE-281

    Improper Preservation of Permissions

  • CWE-502

    Deserialization of Untrusted Data

Sources

Status
PUBLISHED
Assigner
Go
Published
Updated
Sep 15, 2026, 12:04 PM
Reserved
Apr 7, 2026, 6:13 PM
Status
Modified
Published
May 22, 2026, 4:16 AM
Modified
Sep 15, 2026, 12:17 PM