CVE-2025-26465 Openssh: machine-in-the-middle attack if verifyhostkeydns is enabled

Medium 6.8 Published Updated

Attackers can bypass host key verification via MITM if VerifyHostKeyDNS is enabled and memory is exhausted, requiring patched OpenSSH versions.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2025-26465?

CVE-2025-26465 is a medium-severity vulnerability in Debian Debian Linux, published on 18 Feb 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

A vulnerability was found in OpenSSH when the VerifyHostKeyDNS option is enabled. A machine-in-the-middle attack can be performed by a malicious machine impersonating a legit server. This issue occurs due to how OpenSSH mishandles error codes in specific conditions when verifying the host key. For an attack to be considered successful, the attacker needs to manage to exhaust the client's memory resource first, turning the attack complexity high.

Weakness: CWE-390

Which versions are affected by CVE-2025-26465?

It affects 6 products.

Linux distribution packages (40)
openssh AlmaLinux:8All versions8.0p1-26.el8_10
openssh-askpass AlmaLinux:8All versions8.0p1-26.el8_10
openssh-cavs AlmaLinux:8All versions8.0p1-26.el8_10
openssh-clients AlmaLinux:8All versions8.0p1-26.el8_10
openssh-keycat AlmaLinux:8All versions8.0p1-26.el8_10
openssh-ldap AlmaLinux:8All versions8.0p1-26.el8_10
openssh-server AlmaLinux:8All versions8.0p1-26.el8_10
pam_ssh_agent_auth AlmaLinux:8All versions0.10.3-7.26.el8_10
openssh AlmaLinux:9All versions8.7p1-45.el9
openssh-askpass AlmaLinux:9All versions8.7p1-45.el9
openssh-clients AlmaLinux:9All versions8.7p1-45.el9
openssh-keycat AlmaLinux:9All versions8.7p1-45.el9
openssh-server AlmaLinux:9All versions8.7p1-45.el9
pam_ssh_agent_auth AlmaLinux:9All versions0.10.4-5.45.el9
openssh-askpass Red Hat:enterprise_linux:8::appstreamAll versions0:8.0p1-26.el8_10
openssh-askpass-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions0:8.0p1-26.el8_10
openssh-cavs-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions0:8.0p1-26.el8_10
openssh-clients-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions0:8.0p1-26.el8_10
openssh-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions0:8.0p1-26.el8_10
openssh-debugsource Red Hat:enterprise_linux:8::appstreamAll versions0:8.0p1-26.el8_10
openssh-keycat-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions0:8.0p1-26.el8_10
openssh-ldap-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions0:8.0p1-26.el8_10
openssh-server-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions0:8.0p1-26.el8_10
pam_ssh_agent_auth-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions0:0.10.3-7.26.el8_10
openssh Red Hat:enterprise_linux:8::baseosAll versions0:8.0p1-26.el8_10
openssh-askpass-debuginfo Red Hat:enterprise_linux:8::baseosAll versions0:8.0p1-26.el8_10
openssh-cavs Red Hat:enterprise_linux:8::baseosAll versions0:8.0p1-26.el8_10
openssh-cavs-debuginfo Red Hat:enterprise_linux:8::baseosAll versions0:8.0p1-26.el8_10
openssh-clients Red Hat:enterprise_linux:8::baseosAll versions0:8.0p1-26.el8_10
openssh-clients-debuginfo Red Hat:enterprise_linux:8::baseosAll versions0:8.0p1-26.el8_10
openssh-debuginfo Red Hat:enterprise_linux:8::baseosAll versions0:8.0p1-26.el8_10
openssh-debugsource Red Hat:enterprise_linux:8::baseosAll versions0:8.0p1-26.el8_10
openssh-keycat Red Hat:enterprise_linux:8::baseosAll versions0:8.0p1-26.el8_10
openssh-keycat-debuginfo Red Hat:enterprise_linux:8::baseosAll versions0:8.0p1-26.el8_10
openssh-ldap Red Hat:enterprise_linux:8::baseosAll versions0:8.0p1-26.el8_10
openssh-ldap-debuginfo Red Hat:enterprise_linux:8::baseosAll versions0:8.0p1-26.el8_10
openssh-server Red Hat:enterprise_linux:8::baseosAll versions0:8.0p1-26.el8_10
openssh-server-debuginfo Red Hat:enterprise_linux:8::baseosAll versions0:8.0p1-26.el8_10
pam_ssh_agent_auth Red Hat:enterprise_linux:8::baseosAll versions0:0.10.3-7.26.el8_10
pam_ssh_agent_auth-debuginfo Red Hat:enterprise_linux:8::baseosAll versions0:0.10.3-7.26.el8_10

Products include Debian Debian Linux, Netapp Active Iq Unified Manager, Netapp Ontap, OpenSSH, Redhat Enterprise Linux, Redhat Openshift Container Platform.

How do I fix CVE-2025-26465?

Apply the vendor's patch.

Is CVE-2025-26465 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-26465 exists.

Public exploit code: 2 proofs of concept on GitHub.

All Debian Debian Linux vulnerabilities

Sources

Also known as ALPINE-CVE-2025-26465, ALSA-2025:16823, ALSA-2025:6993, AZL-56891, AZL-56894, BELL-CVE-2025-26465 and 26 more.

Is CVE-2025-26465 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free