Live Active security incident? Get immediate response
CVE Record

CVE-2025-5372: Libssh: incorrect return code handling in ssh_kdf() in libssh

A flaw was found in libssh versions built with OpenSSL versions older than 3.0, specifically in the ssh_kdf() function responsible for key derivation. Due to inconsistent interpretation of return values where OpenSSL uses 0 to indicate failure and libssh uses 0 for success—the function may mistakenly return a success status even when key derivation fails. This results in uninitialized cryptographic key buffers being used in subsequent communication, potentially compromising SSH sessions' confidentiality, integrity, and availability.

MediumCVSS 5Not KEV-listed Updated
Glexia's Take moderate

Analyst readout for executives and security teams

Plain-English summary

CVE-2025-5372 is a libssh cryptographic error-handling flaw. In affected builds, a failed key-derivation operation may be treated as successful, causing SSH sessions to use uninitialized keys. That can weaken confidentiality, integrity, and availability, but the published severity is medium and exploitation is not reported in the provided sources.

Executive priority

Treat as a scheduled security update, not an emergency, unless libssh is used in sensitive SSH workflows. Prioritize Red Hat systems explicitly listed as affected and OpenShift environments. The business risk is possible weakening of SSH session protections, with no active exploitation reported in the provided sources.

Technical view

In libssh built with OpenSSL versions older than 3.0, ssh_kdf() may misinterpret return codes: OpenSSL uses 0 for failure, while libssh uses 0 for success. This can lead to uninitialized cryptographic key buffers in subsequent SSH communication. CVSS v3.1 is 5.0: network vector, high complexity, low privileges, no user interaction.

Likely exposure

Exposure is most relevant to Red Hat-listed libssh packages in RHEL 8, RHEL 9, certain extended support streams, and OpenShift Container Platform 4/RHCOS. RHEL 10 is listed unaffected. RHEL 6 and 7 libssh2 status is unknown in the provided data. Non-Red Hat exposure is not established here.

Exploitation context

The source bundle marks KEV as false, and no cited source states active exploitation. The vulnerability is remotely reachable in principle, but rated high complexity and requiring low privileges. Public sources provided do not include exploit details or operational proof of exploitation.

Researcher notes

Key evidence comes from the CVE description and Red Hat affected-product data. The core issue is inconsistent return-code semantics in ssh_kdf(). The bundle does not provide upstream patch details, exploitability research, or non-Red Hat affected-version ranges, so avoid broad ecosystem claims without additional vendor confirmation.

Mitigation direction

  • Apply relevant Red Hat RHSA updates for affected platforms.
  • Review OpenShift/RHCOS update guidance for OpenShift 4 clusters.
  • Prioritize systems using libssh for sensitive or exposed SSH services.
  • For non-Red Hat builds, check vendor libssh guidance.
  • Track RHEL 6/7 libssh2 status separately; source marks unknown.

Validation and detection

  • Inventory installed libssh packages and versions.
  • Map hosts to affected Red Hat products and streams.
  • Check whether libssh uses OpenSSL older than 3.0.
  • Confirm RHSA-listed updates are installed where applicable.
  • Identify applications that embed or dynamically link libssh.
Prepared
Confidence
high
Sources
9

Based on public source material and reviewed before publication.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-682: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

Container behavior lookup

The affected technology mentions containers, so container-specific ATT&CK technique review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2025-5372 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profile CVE Program record
Severity
Medium
CVSS
5 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1 CVSS vectors
5 Timeline events
1 ADP providers
8 Source links

SSVC decision data

CISA-ADP CISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: partial

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

Score Version Severity Vector Exploit Impact Source
5 CVSS 3.1 Medium CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L 1.6 3.4 redhat

Vulnerability scoring details

Base CVSS 3.1 score

5 Medium
CVSS 3.1 vector shape for CVE-2025-5372 Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reserved CVE Program

    The CVE ID was reserved by the assigning CNA.

  2. Source timeline redhat

    Reported to Red Hat.

  3. Source timeline redhat

    Made public.

  4. CVE published CVE Program

    The CVE record was published.

  5. CVE updated CVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CISA-ADP CISA ADP Vulnrichment
other:ssvc

Source materials

Affected products

Products and packages named in the record

Vendor Product Version / package Status
libssh libssh libssh, 0 unaffected
Red Hat Red Hat Enterprise Linux 8 libssh, 0:0.9.6-16.el8_10 affected
Red Hat Red Hat Enterprise Linux 8 libssh, 0:0.9.6-16.el8_10 affected
Red Hat Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support libssh, 0:0.9.4-2.el8_4.2 affected
Red Hat Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On libssh, 0:0.9.4-2.el8_4.2 affected
Red Hat Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support libssh, 0:0.9.6-4.el8_6.2 affected
Red Hat Red Hat Enterprise Linux 8.6 Extended Update Support Long-Life Add-On libssh, 0:0.9.6-4.el8_6.2 affected
Red Hat Red Hat Enterprise Linux 8.8 Telecommunications Update Service libssh, 0:0.9.6-13.el8_8.2 affected
Red Hat Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions libssh, 0:0.9.6-13.el8_8.2 affected
Red Hat Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions libssh, 0:0.9.6-3.el9_0.2 affected
Red Hat Red Hat Enterprise Linux 10 libssh unaffected
Red Hat Red Hat Enterprise Linux 6 libssh2 unknown
Red Hat Red Hat Enterprise Linux 7 libssh2 unknown
Red Hat Red Hat Enterprise Linux 9 libssh affected
Red Hat Red Hat OpenShift Container Platform 4 rhcos affected
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-682 · source CWE mapping

Incorrect Calculation

Incorrect Calculation represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.