CVE-2025-5372

Source
https://cve.org/CVERecord?id=CVE-2025-5372
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-5372.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-5372
Downstream
Related
Published
2025-07-04T06:01:27.954Z
Modified
2026-05-28T04:10:56.357407159Z
Severity
  • 5.0 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L CVSS Calculator
Summary
Libssh: incorrect return code handling in ssh_kdf() in libssh
Details

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.

Database specific
{
    "cwe_ids": [
        "CWE-682"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/5xxx/CVE-2025-5372.json",
    "cna_assigner": "redhat"
}
References

Affected packages

Git / git.libssh.org/projects/libssh.git

Affected ranges

Type
GIT
Repo
https://git.libssh.org/projects/libssh.git
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
dff6c0821ed54f6fbf5b755af43f54cbb723b1b1
Database specific
{
    "extracted_events": [
        {
            "introduced": "0"
        },
        {
            "fixed": "0.11.2"
        }
    ],
    "source": "AFFECTED_FIELD"
}

Affected versions

libssh-0.*
libssh-0.11.0
libssh-0.11.1
libssh-0.8.0
Other
release-0-3-0

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-5372.json"

Git / gitlab.com/libssh/libssh-mirror

Affected ranges

Type
GIT
Repo
https://gitlab.com/libssh/libssh-mirror
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Database specific
{
    "cpe": "cpe:2.3:a:libssh:libssh:*:*:*:*:*:*:*:*",
    "extracted_events": [
        {
            "introduced": "0"
        },
        {
            "fixed": "0.11.2"
        }
    ],
    "source": "CPE_RANGE"
}

Affected versions

libssh-0.*
libssh-0.11.0
libssh-0.11.1
libssh-0.8.0
Other
release-0-3-0

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-5372.json"