CVE-2026-46597

Invoking byte arithmetic causes underflow and panic in golang.org/x/crypto/ssh

Published May 22, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
Description
An incorrectly placed cast from bytes to int allowed for server-side panic in the AES-GCM packet decoder for well-crafted inputs.

Analysis

AI-generated

Technical impact

An incorrectly placed cast from bytes to int in the AES‑GCM packet decoder of golang.org/x/crypto/ssh causes an arithmetic underflow that results in a server‑side panic. The flaw does not directly expose data or grant privileges, but it can crash the service, leading to an availability loss. The vulnerability stems from improper type conversion and integer underflow.

Affected Systems

The affected component is golang.org/x/crypto/ssh from the Golang crypto library. No specific version range is supplied in the advisory, so the issue likely affects all releases before the fix referenced in the issue tracker.

Risk and Exploitability

Based on the description, it is inferred that a remote attacker who can send data to a vulnerable SSH server could craft malformed AES‑GCM packets that trigger the underflow and panic. The CVSS score is 7.5, indicating a high severity flaw. The EPSS score is <1% and the vulnerability is not listed in CISA KEV, so no public evidence of exploitation exists at this time. The attack can be performed without authentication, depending on the server’s readiness to process inbound packets.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade golang.org/x/crypto to a patched version that eliminates the incorrect cast and subsequent underflow.
  • If an immediate upgrade is not possible, monitor for sudden crashes or restart events on the SSH server and block or queue suspicious packets until a patch can be applied.
  • Verify that the patched library does not affect other cryptographic functionality before deployment.

Generated by OpenCVE AI on May 28, 2026 at 15:27 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-q4h4-gmj2-qvw2 golang.org/x/crypto: Invoking byte arithmetic causes underflow and panic
History
Type Values Removed Values Added
First Time appeared Golang crypto
Weaknesses CWE-704
CPEs cpe:2.3:a:golang:crypto:*:*:*:*:*:go:*:*
Vendors & Products Golang crypto
Type Values Removed Values Added
Weaknesses CWE-190
Type Values Removed Values Added
Weaknesses CWE-680
CWE-704
Type Values Removed Values Added
Metrics cvssV3_1

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

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, '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-680
CWE-704
Type Values Removed Values Added
Description An incorrectly placed cast from bytes to int allowed for server-side panic in the AES-GCM packet decoder for well-crafted inputs.
Title Invoking byte arithmetic causes underflow and panic in golang.org/x/crypto/ssh
References
Weaknesses
  • CWE-190

    Integer Overflow or Wraparound

  • CWE-704

    Incorrect Type Conversion or Cast

Sources

Status
PUBLISHED
Assigner
Go
Published
Updated
May 22, 2026, 2:08 PM
Reserved
May 15, 2026, 5:35 PM
Status
Analyzed
Published
May 22, 2026, 4:16 AM
Modified
Jul 23, 2026, 4:10 PM