CVE-2026-39832: CWE-281: Improper Preservation of Permissions in golang.org/x/crypto golang.org/x/crypto/ssh/agent
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.
AI Analysis
Technical Summary
This vulnerability involves improper preservation of permissions (CWE-281) in the golang.org/x/crypto/ssh/agent package. When keys were added to a remote agent, constraint extensions that restrict key usage destinations were not serialized in the request, resulting in these restrictions being silently removed during key forwarding. This flaw could allow forwarded keys to be used without the intended destination restrictions. The fix involves serializing all constraint extensions and rejecting keys with unsupported constraints in the in-memory keyring returned by NewKeyring().
Potential Impact
The impact is that keys forwarded to remote agents could be used without the intended destination restrictions, potentially allowing broader key usage than intended on remote hosts. This could lead to unauthorized use of SSH keys in environments relying on these constraints. There are no known exploits in the wild at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The description indicates that the client now serializes all constraint extensions and rejects unsupported keys, implying a fix has been implemented in the codebase. Users should update to the fixed version once available. Until then, be cautious with key forwarding and monitor for updates from the golang.org/x/crypto project.
CVE-2026-39832: CWE-281: Improper Preservation of Permissions in golang.org/x/crypto golang.org/x/crypto/ssh/agent
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.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
This vulnerability involves improper preservation of permissions (CWE-281) in the golang.org/x/crypto/ssh/agent package. When keys were added to a remote agent, constraint extensions that restrict key usage destinations were not serialized in the request, resulting in these restrictions being silently removed during key forwarding. This flaw could allow forwarded keys to be used without the intended destination restrictions. The fix involves serializing all constraint extensions and rejecting keys with unsupported constraints in the in-memory keyring returned by NewKeyring().
Potential Impact
The impact is that keys forwarded to remote agents could be used without the intended destination restrictions, potentially allowing broader key usage than intended on remote hosts. This could lead to unauthorized use of SSH keys in environments relying on these constraints. There are no known exploits in the wild at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The description indicates that the client now serializes all constraint extensions and rejects unsupported keys, implying a fix has been implemented in the codebase. Users should update to the fixed version once available. Until then, be cautious with key forwarding and monitor for updates from the golang.org/x/crypto project.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- Go
- Date Reserved
- 2026-04-07T18:13:03.529Z
- Cvss Version
- null
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a0fcdabe1370fbb487d5016
Added to database: 5/22/2026, 3:29:47 AM
Last enriched: 5/22/2026, 3:45:18 AM
Last updated: 5/23/2026, 10:55:32 PM
Views: 7
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.