The Qualys Threat Research Unit (TRU) has disclosed two critical vulnerabilities in OpenSSH—CVE-2025-26465 and CVE-2025-26466 — affecting both the client and server components.
The first allows machine-in-the-middle (MitM) attacks against the OpenSSH client when the VerifyHostKeyDNS option is enabled. The second enables an asymmetric denial-of-service (DoS) attack that consumes both memory and CPU, affecting both clients and servers. These flaws have left millions of systems vulnerable for years, with one issue dating back to December 2014.
Flaws in OpenSSH
OpenSSH is a widely adopted open-source implementation of the Secure Shell (SSH) protocol, providing encrypted remote access, file transfers, and tunneling across Linux, macOS, BSD, and Windows environments. Its security is paramount, as it replaces insecure protocols like Telnet and FTP. OpenSSH is integral to cloud infrastructure, enterprise IT, and DevOps automation, making any security flaw in it a major concern.
CVE-2025-26465: MitM Attack via VerifyHostKeyDNS
This flaw, present since OpenSSH 6.8p1 (released in March 2015), allows an active attacker to impersonate an SSH server and bypass identity verification if the VerifyHostKeyDNS option is enabled. The attack succeeds even if the option is set to ask, its default setting on some systems. FreeBSD, for example, enabled this option by default between 2013 and 2023, leaving a decade of FreeBSD users at risk.
When an OpenSSH client connects to a compromised or attacker-controlled network, a machine-in-the-middle can intercept the connection and present a falsified SSH key, tricking the client into establishing a connection with the attacker's server instead of the legitimate one. This could lead to credential theft, session hijacking, and unauthorized data access.
CVE-2025-26466: Pre-Authentication DoS on OpenSSH Client and Server
Introduced in OpenSSH 9.5p1 (August 2023), this flaw allows an attacker to exhaust system resources before authentication, leading to denial-of-service conditions. It exploits OpenSSH's handling of SSH2_MSG_PING packets, causing excessive memory allocation and CPU consumption.
On the client side, this vulnerability can be leveraged in combination with CVE-2025-26465 to exhaust memory, ensuring that the host key verification process is skipped — allowing a MitM attack to succeed. On the server side, attackers can flood SSH daemons with malicious packets, potentially locking out legitimate users and disrupting critical remote access infrastructure.
The fact that CVE-2025-26465 has existed for over a decade underscores how long some vulnerabilities can remain undetected for long even in widely used software. OpenSSH's presence on millions of systems, from personal computers to enterprise data centers, means that any flaw in it has a broad impact. The DoS vulnerability (CVE-2025-26466), though more recent, still affects all versions from 9.5p1 to 9.9p1.
Recommended actions
Organizations relying on OpenSSH for secure remote access, cloud administration, and DevOps workflows must act quickly to mitigate these threats. Attackers exploiting these flaws could compromise privileged access to critical systems, leading to data breaches, service disruptions, and compliance violations.
Organizations should update OpenSSH to version 9.9p2 to eliminate both risks. Additionally, it is recommended to disable VerifyHostKeyDNS unless absolutely necessary and use StrictHostKeyChecking and UserKnownHostsFile for better key validation. To limit exposure to DDoS attacks, enforce LoginGraceTime, MaxStartups, and PerSourcePenalties settings to restrict resource-intensive SSH connections. To detect exploitation early, review SSH logs for unexpected host key changes or excessive resource consumption, which could indicate an attack attempt.
Leave a Reply