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

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

- **Severity:** Medium 6.8 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N`)
- **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:** Yes
- **Published:** 18 Feb 2025
- **Updated:** 21 Oct 2026
- **Also known as:** ALPINE-CVE-2025-26465, ALSA-2025:16823, ALSA-2025:6993, AZL-56891, AZL-56894, BELL-CVE-2025-26465, CLSA-2025-1741290429, CLSA-2025-1742380145, CLSA-2025-1742471910, CLSA-2025-1742472067, CLSA-2025-1742661734, CLSA-2025-1742722852, CLSA-2025-1742731930, CLSA-2025-1742926277, CLSA-2025-1766136770, DEBIAN-CVE-2025-26465, DLA-4057-1, DSA-5868-1, GHSA-jrwv-mv4h-7rrq, JLSEC-2026-72, MGASA-2025-0080, OESA-2025-1315, OESA-2025-1316, RHSA-2025:16823, RHSA-2025:3837, RLSA-2025:16823, RLSA-2025:6993, SUSE-SU-2025:0605-1, SUSE-SU-2025:0659-1, SUSE-SU-2025:0744-1, UBUNTU-CVE-2025-26465, USN-7270-2

## 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 (Detection of Error Condition Without Action)

## Which versions are affected by CVE-2025-26465?

It affects 6 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `openssh` | AlmaLinux:8 | All versions | 8.0p1-26.el8_10 |
| `openssh-askpass` | AlmaLinux:8 | All versions | 8.0p1-26.el8_10 |
| `openssh-cavs` | AlmaLinux:8 | All versions | 8.0p1-26.el8_10 |
| `openssh-clients` | AlmaLinux:8 | All versions | 8.0p1-26.el8_10 |
| `openssh-keycat` | AlmaLinux:8 | All versions | 8.0p1-26.el8_10 |
| `openssh-ldap` | AlmaLinux:8 | All versions | 8.0p1-26.el8_10 |
| `openssh-server` | AlmaLinux:8 | All versions | 8.0p1-26.el8_10 |
| `pam_ssh_agent_auth` | AlmaLinux:8 | All versions | 0.10.3-7.26.el8_10 |
| `openssh` | AlmaLinux:9 | All versions | 8.7p1-45.el9 |
| `openssh-askpass` | AlmaLinux:9 | All versions | 8.7p1-45.el9 |
| `openssh-clients` | AlmaLinux:9 | All versions | 8.7p1-45.el9 |
| `openssh-keycat` | AlmaLinux:9 | All versions | 8.7p1-45.el9 |
| `openssh-server` | AlmaLinux:9 | All versions | 8.7p1-45.el9 |
| `pam_ssh_agent_auth` | AlmaLinux:9 | All versions | 0.10.4-5.45.el9 |
| `openssh-askpass` | Red Hat:enterprise_linux:8::appstream | All versions | 0:8.0p1-26.el8_10 |
| `openssh-askpass-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:8.0p1-26.el8_10 |
| `openssh-cavs-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:8.0p1-26.el8_10 |
| `openssh-clients-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:8.0p1-26.el8_10 |
| `openssh-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:8.0p1-26.el8_10 |
| `openssh-debugsource` | Red Hat:enterprise_linux:8::appstream | All versions | 0:8.0p1-26.el8_10 |
| `openssh-keycat-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:8.0p1-26.el8_10 |
| `openssh-ldap-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:8.0p1-26.el8_10 |
| `openssh-server-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:8.0p1-26.el8_10 |
| `pam_ssh_agent_auth-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:0.10.3-7.26.el8_10 |
| `openssh` | Red Hat:enterprise_linux:8::baseos | All versions | 0:8.0p1-26.el8_10 |
| `openssh-askpass-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 0:8.0p1-26.el8_10 |
| `openssh-cavs` | Red Hat:enterprise_linux:8::baseos | All versions | 0:8.0p1-26.el8_10 |
| `openssh-cavs-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 0:8.0p1-26.el8_10 |
| `openssh-clients` | Red Hat:enterprise_linux:8::baseos | All versions | 0:8.0p1-26.el8_10 |
| `openssh-clients-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 0:8.0p1-26.el8_10 |
| `openssh-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 0:8.0p1-26.el8_10 |
| `openssh-debugsource` | Red Hat:enterprise_linux:8::baseos | All versions | 0:8.0p1-26.el8_10 |
| `openssh-keycat` | Red Hat:enterprise_linux:8::baseos | All versions | 0:8.0p1-26.el8_10 |
| `openssh-keycat-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 0:8.0p1-26.el8_10 |
| `openssh-ldap` | Red Hat:enterprise_linux:8::baseos | All versions | 0:8.0p1-26.el8_10 |
| `openssh-ldap-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 0:8.0p1-26.el8_10 |
| `openssh-server` | Red Hat:enterprise_linux:8::baseos | All versions | 0:8.0p1-26.el8_10 |
| `openssh-server-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 0:8.0p1-26.el8_10 |
| `pam_ssh_agent_auth` | Red Hat:enterprise_linux:8::baseos | All versions | 0:0.10.3-7.26.el8_10 |
| `pam_ssh_agent_auth-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 0:0.10.3-7.26.el8_10 |

Products: 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:

- MitM attack allowing a malicious interloper to impersonate a legitimate server when a client attempts to connect to it (github_poc): https://github.com/rxerium/CVE-2025-26465
- Patch Manual para a correção das  CVE-2025-26465-e-CVE-2025-26466, para sistemas sem update do OpenSSH (github_poc): https://github.com/dolutech/patch-manual-CVE-2025-26465-e-CVE-2025-26466

## Other vulnerabilities in Debian Debian Linux

- [CVE-2015-3306](https://insights.sbomify.com/CVE-2015-3306/): ProFTPD Improper Access Control (critical 10.0, exploited in the wild)
- [CVE-2025-49113](https://insights.sbomify.com/CVE-2025-49113/): RoundCube Webmail Deserialization of Untrusted Data (critical 9.9, exploited in the wild)
- [CVE-2026-24061](https://insights.sbomify.com/CVE-2026-24061/): GNU InetUtils Argument Injection (critical 9.8, exploited in the wild)
- [CVE-2025-39682](https://insights.sbomify.com/CVE-2025-39682/): Linux Kernel Improper Check for Unusual or Exceptional Conditions (critical 9.8, exploited in the wild)
- [CVE-2024-9680](https://insights.sbomify.com/CVE-2024-9680/): Mozilla Firefox Use-After-Free (critical 9.8, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-26465 and fix it if it is affected.

What it is: 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.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-26465 exists.

Affected product: Debian Debian Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-26465/ (Markdown: https://insights.sbomify.com/CVE-2025-26465/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-26465
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-26465
- OSV: https://osv.dev/vulnerability/CVE-2025-26465

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-26465/
Summaries are generated and may contain mistakes; the official description above is the record.
