CVE-2026-102824: Russh Missing X25519 Zero-point Validation Vulnerability

MODERATE
Advisory Identifier: GHSA-w3jg-pjxf-73p4
CVSS 4.3
CWE-327
Published
Advisory Summary

CVE-2026-102824 is a MODERATE (CVSS 4.3) missing x25519 zero-point validation vulnerability (CWE-327: Use of a Broken or Risky Cryptographic Algorithm) affecting Russh libraries in the crates.io ecosystem. The issue involves missing x25519 zero-point validation in hybrid ml-kem key exchange. Remediation is available by upgrading affected packages to version 0.63.0.

CVE-2026-102824 at a Glance

CVE Identifier CVE-2026-102824
GHSA Identifier GHSA-w3jg-pjxf-73p4
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-327: Use of a Broken or Risky Cryptographic Algorithm
Affected Product Russh
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 4.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-102824

To remediate this vulnerability, upgrade all affected Russh dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

russh fixed: 0.63.0
Upgrade russh to 0.63.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for russh

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-102824, inspect your project dependencies for Russh:

inspect dependencies for russh

Analyze the terminal output to locate any version of Russh in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.63.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-327: Use of a Broken or Risky Cryptographic Algorithm, where the product uses a broken or risky cryptographic algorithm or protocol. In Russh, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Vulnerability The hybrid ML-KEM 768 + X25519 key exchange implementation in `russh/src/kex/hybrid_mlkem.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** (`server_dh`, lines 92-93): ```rust let mut c_pk1 = MontgomeryPoint([0; 32]); c_pk1.0.copy_from_slice(c_pk1_bytes); // No zero-point check - proceeds to: let k_cl = s_secret * c_pk1; ``` **Client-side** (`compute_shared_secret`, lines 154-155): ```rust let mut s_pk1 = MontgomeryPoint([0; 32]); s_pk1.0.copy_from_slice(s_pk1_bytes); // No zero-point check - proceeds to: let k_cl = x25519_secret * s_pk1; ``` ## 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: - `server_dh` line 77: `if client_pubkey.0 == [0u8; 32] { return Err(crate::Error::Kex); }` - `compute_shared_secret` line 122: `if remote_pubkey.0 == [0u8; 32] { return Err(crate::Error::Kex); }` The same X25519 scalar multiplication pattern appears in `hybrid_mlkem.rs`, but the fix was not applied there. ## Proof of Concept A malicious SSH client negotiating `mlkem768x25519-sha256` can send a KEX_HYBRID_INIT message containing a valid ML-KEM 768 encapsulation key followed by 32 zero bytes as the X25519 component. When the server computes `k_cl = s_secret * c_pk1`, the result is the zero point regardless of the server's secret scalar. The combined shared secret `K = SHA-256(k_pq || k_cl)` 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 `hybrid_mlkem.rs` matching the ones in `curve25519.rs`: ```rust // In server_dh, after line 93: let mut c_pk1 = MontgomeryPoint([0; 32]); c_pk1.0.copy_from_slice(c_pk1_bytes); if c_pk1.0 == [0u8; 32] { return Err(Error::Kex); } // In compute_shared_secret, after line 155: let mut s_pk1 = MontgomeryPoint([0; 32]); s_pk1.0.copy_from_slice(s_pk1_bytes); if s_pk1.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.

CVE-2026-102824 Affected Russh Versions

1 component(s)
Fixed Versions:
0.63.0
Product / Package Ecosystem Affected Versions Fixed Version
russh
crates.io
< 0.63.0
0.63.0

References

Frequently Asked Questions

What is CVE-2026-102824?
CVE-2026-102824 is a security vulnerability in Russh involving Missing X25519 zero-point validation in hybrid ML-KEM key exchange under CWE-327: Use of a Broken or Risky Cryptographic Algorithm.
Which Russh versions are affected?
Affected versions include releases prior to 0.63.0 across affected packages: russh.
What version fixes CVE-2026-102824?
Upgrading to 0.63.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is russh affected?
Yes, russh is affected in releases prior to 0.63.0. Upgrade your dependency to 0.63.0 or later.
What is the CVSS score of CVE-2026-102824?
CVE-2026-102824 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2026-102824?
CVE-2026-102824 is classified under CWE-327: Use of a Broken or Risky Cryptographic Algorithm (The product uses a broken or risky cryptographic algorithm or protocol.).
How can I check crates.io dependencies for CVE-2026-102824?
Run the dependency tree command: 'inspect dependencies for russh'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-w3jg-pjxf-73p4",
  "modified" : "2026-09-30T23:26:48Z",
  "published" : "2026-09-30T23:26:48Z",
  "aliases" : [ "CVE-2026-102824" ],
  "summary" : "Russh: Missing X25519 zero-point validation in hybrid ML-KEM key exchange",
  "details" : "## Vulnerability\n\nThe hybrid ML-KEM 768 + X25519 key exchange implementation in `russh/src/kex/hybrid_mlkem.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.\n\nAffected code at HEAD (v0.62.4, commit 0089c89):\n\n**Server-side** (`server_dh`, lines 92-93):\n```rust\nlet mut c_pk1 = MontgomeryPoint([0; 32]);\nc_pk1.0.copy_from_slice(c_pk1_bytes);\n// No zero-point check - proceeds to: let k_cl = s_secret * c_pk1;\n```\n\n**Client-side** (`compute_shared_secret`, lines 154-155):\n```rust\nlet mut s_pk1 = MontgomeryPoint([0; 32]);\ns_pk1.0.copy_from_slice(s_pk1_bytes);\n// No zero-point check - proceeds to: let k_cl = x25519_secret * s_pk1;\n```\n\n## Root Cause\n\nCommit 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:\n- `server_dh` line 77: `if client_pubkey.0 == [0u8; 32] { return Err(crate::Error::Kex); }`\n- `compute_shared_secret` line 122: `if remote_pubkey.0 == [0u8; 32] { return Err(crate::Error::Kex); }`\n\nThe same X25519 scalar multiplication pattern appears in `hybrid_mlkem.rs`, but the fix was not applied there.\n\n## Proof of Concept\n\nA malicious SSH client negotiating `mlkem768x25519-sha256` can send a KEX_HYBRID_INIT message containing a valid ML-KEM 768 encapsulation key followed by 32 zero bytes as the X25519 component.\n\nWhen the server computes `k_cl = s_secret * c_pk1`, the result is the zero point regardless of the server's secret scalar. The combined shared secret `K = SHA-256(k_pq || k_cl)` then depends only on the ML-KEM component. The same attack works in reverse against a client connecting to a malicious server.\n\nThe 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.\n\n## Impact\n\nThe 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.\n\nThis matters in two scenarios:\n1. 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.\n2. An active network attacker who can intercept KEX could downgrade the hybrid exchange to effectively single-algorithm security without either peer detecting it.\n\nThe 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.\n\n## Suggested Fix\n\nAdd zero-point checks in `hybrid_mlkem.rs` matching the ones in `curve25519.rs`:\n\n```rust\n// In server_dh, after line 93:\nlet mut c_pk1 = MontgomeryPoint([0; 32]);\nc_pk1.0.copy_from_slice(c_pk1_bytes);\nif c_pk1.0 == [0u8; 32] {\n    return Err(Error::Kex);\n}\n\n// In compute_shared_secret, after line 155:\nlet mut s_pk1 = MontgomeryPoint([0; 32]);\ns_pk1.0.copy_from_slice(s_pk1_bytes);\nif s_pk1.0 == [0u8; 32] {\n    return Err(Error::Kex);\n}\n```\n\nIdeally, 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.\n\n### AI tooling\n\nAI 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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "russh"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.63.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Eugeny/russh/security/advisories/GHSA-w3jg-pjxf-73p4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-102824"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Eugeny/russh/commit/8da8967f196472576b1565d518a0ed60fce60f0c"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Eugeny/russh"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Eugeny/russh/releases/tag/v0.63.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-327" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-30T23:26:48Z",
    "nvd_published_at" : "2026-09-29T19:17:24Z"
  }
}