Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. russh
  4. ›
  5. CVE-2026-102822

CVE-2026-102822: russh: negotiating a MAC-requiring block cipher (CTR/CBC) with mac=none causes a slice-index-out-of-range panic

September 30, 2026

SshBlockCipher implementations (AES-CBC, AES-CTR, 3DES-CBC, etc.) report needs_mac() == true, meaning they are documented/intended to always be paired with a separate integrity MAC. However, key-exchange negotiation only checks needs_mac() inside the fallback branch of MAC algorithm selection (used when no common MAC algorithm exists). If both peers’ preferred MAC lists simply contain none and it is successfully negotiated through the normal selection path, nothing rejects pairing none with a cipher that requires a MAC. Once negotiated, a single crafted packet from either peer causes cipher::read() to shrink an already-allocated buffer below the number of bytes it is about to index, causing a Rust slice-index-out-of-range panic and killing that connection’s task.

References

  • github.com/Eugeny/russh/commit/2885385abfee279092a41d80c6cb6ac367353159
  • github.com/Eugeny/russh/releases/tag/v0.63.1
  • github.com/Eugeny/russh/security/advisories/GHSA-p8qx-h547-fjw9
  • github.com/advisories/GHSA-p8qx-h547-fjw9
  • nvd.nist.gov/vuln/detail/CVE-2026-102822

Code Behaviors & Features

Detect and mitigate CVE-2026-102822 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.63.1

Fixed versions

  • 0.63.1

Solution

Upgrade to version 0.63.1 or above.

Impact 3.7 LOW

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L

Learn more about CVSS

Weakness

  • CWE-129: Improper Validation of Array Index

Source file

cargo/russh/CVE-2026-102822.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 07 Oct 2026 00:18:48 +0000.