CVE-2026-102824: Russh: Missing X25519 zero-point validation in hybrid ML-KEM key exchange

Published Sep 29, 2026
·
Updated

Vulnerability

The hybrid ML-KEM 768 + X25519 key exchange implementation in russh/src/kex/hybridmlkem.rs does not validate that the remote peer's X25519 public key is not the zero point (all-zero 32-byte value). This allows a remote peer to force the X25519 contribution to the combined shared secret to zero, reducing the hybrid KEX to a single-algorithm exchange.

Affected code at HEAD (v0.62.4, commit 0089c89):

Server-side (serverdh, lines 92-93): rust let mut cpk1 = MontgomeryPoint([0; 32]); cpk1.0.copyfromslice(cpk1bytes); // No zero-point check - proceeds to: let kcl = ssecret cpk1;

Client-side (computesharedsecret, lines 154-155): rust let mut spk1 = MontgomeryPoint([0; 32]); spk1.0.copyfromslice(spk1bytes); // No zero-point check - proceeds to: let kcl = x25519secret spk1;

Root Cause

Commit a7fc1eb (2026-07-22, "fix mpint encoding and validate curve25519 keys") added zero-point validation to the standalone Curve25519 KEX in russh/src/kex/curve25519.rs at two locations: - serverdh line 77: if clientpubkey.0 == [0u8; 32] { return Err(crate::Error::Kex); } - computesharedsecret line 122: if remotepubkey.0 == [0u8; 32] { return Err(crate::Error::Kex); }

The same X25519 scalar multiplication pattern appears in hybridmlkem.rs, but the fix was not applied there.

Proof of Concept

A malicious SSH client negotiating mlkem768x25519-sha256 can send a KEXHYBRIDINIT message containing a valid ML-KEM 768 encapsulation key followed by 32 zero bytes as the X25519 component.

When the server computes kcl = ssecret cpk1, the result is the zero point regardless of the server's secret scalar. The combined shared secret K = SHA-256(kpq || kcl) then depends only on the ML-KEM component. The same attack works in reverse against a client connecting to a malicious server.

The zero X25519 public key passes all existing validation (the length check on line 78 succeeds since 32 bytes is correct). No panic or crash occurs - the exchange completes successfully with a weakened shared secret.

Impact

The purpose of hybrid key exchange is defense-in-depth: if either the classical algorithm (X25519) or the post-quantum algorithm (ML-KEM 768) is broken, the combined secret remains secure. By injecting a zero X25519 public key, an attacker eliminates the classical contribution entirely, reducing security to depend solely on ML-KEM.

This matters in two scenarios: 1. If ML-KEM 768 is later found to have a weakness (the explicit threat model hybrid KEX is designed to mitigate), sessions where the X25519 component was zeroed out lose their fallback protection. 2. An active network attacker who can intercept KEX could downgrade the hybrid exchange to effectively single-algorithm security without either peer detecting it.

The severity is MEDIUM rather than HIGH because the ML-KEM component still provides strong security today, and an active attacker who can modify KEX messages can already perform other attacks unless strict KEX is negotiated.

Suggested Fix

Add zero-point checks in hybridmlkem.rs matching the ones in curve25519.rs:

rust // In serverdh, after line 93: let mut cpk1 = MontgomeryPoint([0; 32]); cpk1.0.copyfromslice(cpk1bytes); if cpk1.0 == [0u8; 32] { return Err(Error::Kex); }

// In computesharedsecret, after line 155: let mut spk1 = MontgomeryPoint([0; 32]); spk1.0.copyfromslice(spk1bytes); if spk1.0 == [0u8; 32] { return Err(Error::Kex); }

Ideally, also validate against the other small-subgroup points on Curve25519 (there are a small number of low-order points that also yield a zero shared secret), matching the comprehensive validation OpenSSH performs.

AI tooling

AI assistancewas used for the code audit and for drafting this report. The finding was manually verified against the project's source at the location cited above before reporting it, and the severity and impact assessment are my own.

Other sources

Russh is a Rust SSH client and server library. Prior to 0.63.0, the hybrid ML-KEM 768 and X25519 implementation in russh/src/kex/hybridmlkem.rs accepts an all-zero 32-byte peer X25519 public key in both serverdh and computesharedsecret, forcing the X25519 contribution to the combined shared secret to zero. A malicious SSH peer can therefore make the combined secret depend only on ML-KEM, defeating the hybrid exchange's intended fallback protection if ML-KEM is later weakened. This issue is fixed in version 0.63.0.

— MITRE

Affected Software

2 affected componentsFixes available
cargo/russh<0.63.0
rust/russh<0.63.0
0.63.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade rust/russh to a version that resolves this vulnerability.

    Fixed in 0.63.0
  2. Upgrade

    Upgrade russh to a version that resolves this vulnerability.

    Fixed in 0.63.0

Event History

Sep 29, 2026
CVE Published
via MITRE·06:27 PM
Data Sourced
via MITRE·06:27 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·07:17 PM
DescriptionSeverityWeakness
Sep 30, 2026
Advisory Published
via GitHub·11:26 PM
Data Sourced
via GitHub·11:26 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which deployments are exposed?

Russh SSH clients and servers using the hybrid ML-KEM 768 and X25519 key exchange are affected when running versions earlier than 0.63.0. The issue can be triggered by a malicious SSH peer.

2

What does an attacker need to do to exploit this?

The attacker needs to act as the SSH peer and provide an all-zero 32-byte X25519 public key during the hybrid key exchange. No user interaction is required, but the CVSS vector indicates the attacker has low privileges.

3

What is the security impact of a successful attack?

The X25519 portion of the combined secret is forced to zero, leaving the combined secret dependent only on ML-KEM. This removes the hybrid exchange's intended fallback protection if ML-KEM is weakened in the future.

4

What should teams do to remediate the issue?

Upgrade russh to version 0.63.0 or later, which fixes the missing zero-point validation. The provided data does not specify an alternative mitigation for environments that cannot upgrade immediately.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203