OpenSSH (CVE-2024-6387)

:warning: Critical OpenSSH Vulnerability (CVE-2024-6387) – How to Fix on Debian / HestiaCP

:pushpin: What is the vulnerability?

CVE-2024-6387, also known as regreSSHion, is a critical vulnerability in the OpenSSH server that may allow remote unauthenticated code execution as root on Linux systems using glibc.

Affected versions include:

  • OpenSSH 8.5p1 through 9.7p1

:warning: Any server with SSH exposed to the internet is at high risk.


:pushpin: How to check your current OpenSSH version

Run on the server:

ssh -V

If the version is lower than 9.8p1, your system must be updated.


:white_check_mark: Fix on Debian 12 (Bookworm) using Backports

Debian provides the fix via backports, which is the recommended and safe approach, without upgrading the OS.


:one: Add the backports repository

echo "deb http://deb.debian.org/debian bookworm-backports main" | sudo tee /etc/apt/sources.list.d/backports.list

:two: Update package lists

sudo apt update

:three: Check the fixed version availability

apt-cache policy -t bookworm-backports openssh-server

You should see OpenSSH 9.8p1 or newer.

Upgrade OpenSSH (server and client)

sudo apt -t bookworm-backports install openssh-server openssh-client

:five: Validate SSH configuration (important)
Before restarting the service:

sudo sshd -t

If there is no output, the configuration is valid.

:seven: Confirm the installed version

ssh -V

Expected output example:

OpenSSH_10.0p2

There is no need to upgrade using backports, that vulnerability is already fixed in current versions.

Vulnerable and fixed packages

Source Package Release Version Status
openssh (PTS) bullseye 1:8.4p1-5+deb11u3 fixed
bullseye (security) 1:8.4p1-5+deb11u5 fixed
bookworm 1:9.2p1-2+deb12u7 fixed
bookworm (security) 1:9.2p1-2+deb12u5 fixed
trixie 1:10.0p1-7 fixed
forky, sid 1:10.2p1-3 fixed

More info:

3 Likes

Thank you for the clarification.
I wasn’t aware that the Debian patch already addressed the issue at the time.
I updated via backports as a precaution, and everything is working fine and stable.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.