Outdated OpenSSH

The SSH service runs an OpenSSH release that is missing published security fixes.

SeverityMedium
CVSS 3.15.6 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L Open in the calculator
CVSS 4.06.3 CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N Open in the calculator
CWECWE-1395: Dependency on Vulnerable Third-Party Component
OWASP Top 10A03:2025 Software Supply Chain Failures
MITRE ATT&CKT1190 Exploit Public-Facing Application, T1210 Exploitation of Remote Services
CategoryOutdated Components

Description

The SSH service runs a release of OpenSSH that predates fixes for one or more published vulnerabilities, and what an attacker can do depends on the vulnerabilities actually present. Most published OpenSSH flaws allow information disclosure such as username enumeration, denial of service, or attacks that need a non-default configuration or a user connecting to a malicious server; flaws in the client, ssh-agent and scp matter where the host is also used to connect to other systems. Many of these issues apply only with particular configurations or platforms.

The most serious, such as a signal handler race in the server that affects glibc-based Linux systems (CVE-2024-6387, known as regreSSHion), allow an unauthenticated attacker to run code as root, although exploiting that flaw requires many connection attempts over an extended period. SSH services exposed to the internet or to untrusted networks are the most at risk, and restricting access to SSH considerably reduces the likelihood of exploitation.

The finding is normally raised from the version string the server sends at the start of every connection, such as SSH-2.0-OpenSSH_ followed by a version and often a distribution package suffix, and scanners report one result per advisory affecting that version. This method is unreliable for OpenSSH supplied by Linux distributions and BSDs, which backport security fixes without changing the upstream version number, so a server announcing an old version may be fully patched. Results should therefore be confirmed against the distribution's own advisories or package changelog, or by an authenticated check of the installed package. Builds embedded in appliances and network devices are updated by the device vendor and follow its advisories.

Remediation

Update OpenSSH through the source it was installed from:

  • On Linux and BSD hosts, install the latest OpenSSH package from the distribution's security updates and restart the sshd service. Do not replace a distribution package with a source build just to satisfy a version check, as this removes the host from the distribution's future updates.
  • Where OpenSSH was built from source, upgrade to the current upstream release from the OpenSSH project and rebuild it with the same configuration. On appliances and network devices, apply the vendor's software update.
  • Restrict access to SSH with firewall rules or an allowlist of management networks, avoid exposing it directly to the internet, and use key-based authentication.
  • Use configuration workarounds published for a specific advisory only as a temporary measure and with their side effects understood; for example, setting LoginGraceTime 0 prevents code execution through CVE-2024-6387 but leaves the server open to connection exhaustion.

Confirm the fix by checking the installed package against the distribution's advisory for each reported CVE, or by checking the announced version where OpenSSH was built from source.

References


Add This Finding to Your Library

In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.

Free trial  ·  No card required

Only need the reporting? Our reporting tool is free and open source, with the same library.


More Patching and Outdated Software Findings

Every Patching and Outdated Software finding