The Qualys Threat Research Unit (TRU) has discovered two vulnerabilities in OpenSSH. The first, tracked as CVE-2025-26465 (CVSS score: 6.8) can be exploited by an attacker to conduct an active machine-in-the-middle attack on the OpenSSH client when the VerifyHostKeyDNS option is enabled. The second vulnerability, tracked CVE-2025-26466 (CVSS score: 5.9), affects both the OpenSSH client and server, allowing a pre-authentication denial-of-service attack.
The OpenSSH client vulnerability (CVE-2025-26465) allows an attack to succeed regardless of the VerifyHostKeyDNS setting, without user interaction or reliance on SSHFP DNS records. Introduced in December 2014 (OpenSSH 6.8p1), this flaw remained active, with FreeBSD enabling VerifyHostKeyDNS by default from 2013 to 2023, increasing exposure.
“If an attacker can perform a man-in-the-middle attack via CVE-2025-26465, the client may accept the attacker’s key instead of the legitimate server’s key. This would break the integrity of the SSH connection, enabling potential interception or tampering with the session before the user even realizes it. SSH sessions can be a prime target for attackers aiming to intercept credentials or hijack sessions.” reads the report published by Qualys. “If compromised, hackers could view or manipulate sensitive data, move across multiple critical servers laterally, and exfiltrate valuable information such as database credentials.”
The OpenSSH client and server are vulnerable (CVE-2025-26466) to a pre-authentication denial-of-service (DoS) attack. Successful exploitation of the issue can cause high memory and CPU consumption. Introduced in August 2023 (before OpenSSH 9.5p1), the attack can be mitigated on servers using LoginGraceTime, MaxStartups, and PerSourcePenalties settings.
“SSH is a critical service for remote system administration. If attackers can repeatedly exploit the flaw CVE-2025-26466, they may cause prolonged outages or prevent administrators from managing servers, effectively locking legitimate users out.” continues the report. “An enterprise facing this vulnerability could see critical servers become unreachable, interrupting routine operations and stalling essential maintenance tasks.”
Both vulnerabilities have been fixed in OpenSSH 9.9p2, released today by OpenSSH maintainers.
In July, OpenSSH fixed another vulnerability, tracked as CVE-2024-6409 (CVSS score: 7.0), that impacts select versions of the OpenSSH secure networking suite. The flaw can be exploited to achieve remote code execution (RCE).
The issue is a possible race condition in cleanup_exit() in openssh’s privsep child that impacts openssh versions 8.7p1 and 8.8p1. `cleanup_exit()` gets called from the privsep child, which appears to call the non-asynchronous safe `do_cleanup()`, but possibly only post authentication (`the_authctxt != NULL`).
The vulnerability CVE-2024-6409 is distinct from CVE-2024-6387 (aka RegreSSHion) because in the former the race condition and RCE potential are triggered in the privsep child process, which runs with reduced privileges compared to the parent server process.
The CVE-2024-6409 vulnerability affects only the sshd server shipped in RHEL 9, while the upstream versions of sshd are not impacted.
Follow me on Twitter: @securityaffairs and Facebook and Mastodon
(SecurityAffairs – hacking, DoS)