Security advisory Debian

Debian OpenSSH client MitM flaw with VerifyHostKeyDNS (DSA-5868-1, CVE-2025-26465)

DSA-5868-1 fixed an OpenSSH client flaw that lets an on-path attacker impersonate a server when VerifyHostKeyDNS is enabled. Off by default.

Published
Reading time
4 min read

Security advisory Vulnerability

Severity: Medium Status: Patched
Status
Fixed versions are available for Debian 12 (bookworm) and Debian 11 (bullseye).
Affected
  • openssh in Debian 12 (bookworm) before 1:9.2p1-2+deb12u5
  • openssh in Debian 11 (bullseye) before 1:8.4p1-5+deb11u4
Published
Updated

What you should do

  • Make sure openssh-client on bookworm is at 1:9.2p1-2+deb12u5 or later.
  • Find any VerifyHostKeyDNS yes or ask settings. If you rely on SSHFP records, only do so with up-to-date clients and DNSSEC-validated answers.
  • Restart long-running SSH tunnels and multiplexed connections after the update.
  • Upgrade any remaining Debian 11 systems; they no longer receive Debian LTS fixes.
Timeline
  1. Debian published DSA-5868-1 for openssh.
  2. The Debian LTS team published DLA-4057-1 for openssh.
  3. Skyline published this summary.

On 18 February 2025 Debian released DSA-5868-1 for openssh on Debian 12 (bookworm). It fixes CVE-2025-26465, found by the Qualys Threat Research Unit: the OpenSSH client could be fooled by a machine-in-the-middle when the VerifyHostKeyDNS option is enabled. That option is off by default, so most machines were never exposed, but admin workstations and automation hosts that trust SSHFP records in DNS should check.

At a glance

ItemDetail
Source packageopenssh (the fix matters for the openssh-client binary package, which provides ssh)
ReleasesDebian 12 (bookworm); Debian 11 (bullseye) received DLA-4057-1 the same day
Fixed versionsbookworm 1:9.2p1-2+deb12u5; bullseye 1:8.4p1-5+deb11u4 (historical)
CVECVE-2025-26465
SeverityMedium: CNA (Red Hat) CVSS 3.1 base 6.8
AdvisoryDSA-5868-1, 18 February 2025

What the vulnerability is

With VerifyHostKeyDNS set, the ssh client checks the server's host key against SSHFP records published in DNS. The OpenSSH 9.9p2 release notes describe a logic error in versions 6.8p1 to 9.9p1 that allowed an on-path attacker to impersonate any server when this option is enabled. Qualys notes that the attack works whether the option is set to yes or ask, and without user interaction. A successful attacker could read or alter what you send over that session, including passwords typed into it.

The same Qualys report covers a second issue, CVE-2025-26466, a pre-authentication memory and CPU denial of service in OpenSSH 9.5p1 to 9.9p1. Debian's security tracker marks bookworm and bullseye as not affected because the vulnerable code was introduced in a later upstream version. Debian 13 (trixie) ships OpenSSH 10.0p1, which is newer than the fixed 9.9p2, and the tracker lists it as fixed for both CVEs.

Are you affected?

Check the installed client version and compare it with the fixed one:

dpkg-query -W -f='${Package} ${Version}\n' openssh-client openssh-server
apt policy openssh-client

Then check whether any configuration enables the option. ssh -G prints the configuration the client would use for a host after evaluating Host and Match blocks:

ssh -G server.example.com | grep -i verifyhostkeydns
grep -ri verifyhostkeydns /etc/ssh/ssh_config /etc/ssh/ssh_config.d/ ~/.ssh/config

If the value shown is not yes/true or ask for the hosts you connect to (the default is off), the flaw did not apply to you. Remember to check the accounts used by scripts, CI runners and backup jobs, not only your own user.

How to update

sudo apt update
sudo apt install --only-upgrade openssh-client openssh-server
apt policy openssh-client

A system that has received regular apt upgrade runs since February 2025 already has this fix: the bookworm version available today is newer than 1:9.2p1-2+deb12u5. Debian 11 (bullseye) reached the end of its LTS period on 31 August 2026, so bullseye machines should be upgraded to a supported release rather than patched package by package.

Restart or reboot?

No reboot is needed. The fix is in the client, so it applies the next time ssh starts. Close and reopen long-lived client processes such as tunnels, autossh sessions and ControlMaster connections so they use the updated binary.

Sources

SKYLINE Engineering

@skyline

The engineering team at SKYLINE Industrial Solutions. We publish field-tested guides drawn from real KSA and GCC deployments.

See author profile
SKYLINE engineering services

Need this implemented for you?

Reading is free — building it right takes a team. SKYLINE engineers ship Debian for Aramco vendors, banks, hospitals and government agencies across Saudi Arabia. Talk to us before you start.

Aramco Approved Contractor ISO 9001 · ISO 27001 SAMA CSF aligned NCA ECC ready 247+ KSA clients

Comments

0 total · 0 threads
Be the first to leave a comment.