Denial-of-Service Vulnerability in Russh Client Due to X25519 Key Exchange Panic

russh Updated 24 Jul 2026

Summary

24/07/2026
MODERATE
Yes i
Moderate
5.3

GHSA-g9hv-x236-4qp3: Russh: client wrong-length X25519 clone_from_slice panic (pre-auth DoS). Affects russh versions < 0.62.4. Fixed in 0.62.4. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Russh is an open-source Rust library that implements the SSH protocol, allowing secure remote access and communication. It supports various key exchange algorithms, including curve25519-sha256, which is the default and most preferred. The library is designed for performance and security, but a recent vulnerability has been identified that can lead to a Denial-of-Service (DoS) condition when connecting to a malicious SSH server.

Vulnerability Detail

A vulnerability exists in the Russh client where a malicious SSH server can send a malformed key-exchange reply, specifically a KEX_ECDH_REPLY with an incorrect length for the server ephemeral key. This causes the Russh client to panic during the execution of the compute_shared_secret function, leading to a pre-authentication Denial-of-Service. The panic occurs because the client does not validate the length of the received ephemeral key before attempting to clone it, resulting in a deterministic crash of the client session. This vulnerability is classified under CWE-704, indicating an incorrect type conversion or cast, and has a CVSS score of 5.3.

How To Fix

Latest published version: 0.64.1 as of 22 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.62.4

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, clients can disable the curve25519-sha256 key exchange algorithm in their preferred list and opt for a key exchange algorithm that validates peer ephemeral lengths, such as ECDH-NIST or DH/GEX. This can be done by modifying the Preferred::kex setting in your SSH client configuration.

Conclusion

The Russh client has a vulnerability that can be exploited by malicious SSH servers to cause a Denial-of-Service condition. It is crucial for users to update to the patched version 0.62.4 or later to mitigate this risk. Until then, applying the recommended workaround can help reduce exposure to this vulnerability.

See every vulnerability recorded for russh →

Share this vulnerability

FAQ

The vulnerability allows a malicious SSH server to crash the Russh client, leading to a Denial-of-Service condition. This means that the client will be unable to establish a connection until restarted.

Any deployment using the Russh client to connect to potentially malicious or Man-in-the-Middle (MitM) reachable SSH servers is at risk. This includes applications that rely on Russh for secure communication.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up or install anything.

If you cannot update the Russh package right away, implement the suggested workaround by disabling the curve25519-sha256 key exchange algorithm and opting for a safer alternative.

The CVSS score of this vulnerability is 5.3, indicating a moderate severity level.

Related vulnerabilities

Recent vulnerabilities recorded for russh.

How To Fix

Latest published version: 0.64.1 as of 22 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.62.4

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback