PortGate

Advisories · Linux & SSH

CVE-2023-48795 Medium CVSS 5.9

SSH Terrapin prefix truncation

Disclosed 2023 · Last reviewed 2 Dec 2026

An on-path attacker could delete some messages at the start of an SSH session. OpenSSH 9.6 adds a strict key-exchange countermeasure.

What happened

The SSH handshake did not bind the number of ignored packets to the transcript, so a prefix could be removed without detection.

Affected and patched versions

Affected
OpenSSH before 9.6, plus other SSH implementations that lacked the strict key-exchange extension.
Patched
OpenSSH 9.6p1 and later. Other clients and servers need their own strict-kex update.

How to check your server

Check

sshd -V

How to fix and harden

  1. Run sshd -V. The version is on stderr.
  2. Upgrade OpenSSH to 9.6p1 or later, or install the distro package that backports strict kex.
  3. Update the clients too. The extension works only when both sides speak it.
  4. A distro build older than 9.6p1 can still be patched. Read the changelog before treating the number alone as proof.

Fix

sshd -V

Sources

Version ranges and fixes follow the vendor advisory. When a distribution backports a fix, trust its security tracker over the upstream version number. New advisories: RSS · JSON